Menu: Ignore mouseenter events while typeahead is actice

Prevents focusing the wrong item when typeahead causes a scroll while the mouse
is over an item in the menu.

Fixes #10458
This commit is contained in:
Jörn Zaefferer 2014-08-27 13:27:06 -03:00
parent 1abf9fc71f
commit ddc666ce8b

View File

@ -101,6 +101,12 @@ return $.widget( "ui.menu", {
}
},
"mouseenter .ui-menu-item": function( event ) {
// Ignore mouse events while typeahead is active, see #10458.
// Prevents focusing the wrong item when typeahead causes a scroll while the mouse
// is over an item in the menu
if ( this.previousFilter ) {
return;
}
var target = $( event.currentTarget );
// Remove ui-state-active class from siblings of the newly focused menu item
// to avoid a jump caused by adjacent elements both having a class with a border