Skip to content

Commit ddc666c

Browse files
committed
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
1 parent 1abf9fc commit ddc666c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ui/menu.js

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

0 commit comments

Comments
 (0)