mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-10-05 01:44:18 +00:00
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:
parent
1abf9fc71f
commit
ddc666ce8b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user