Skip to content
Permalink
Browse files
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
  • Loading branch information
jzaefferer committed Aug 27, 2014
1 parent 1abf9fc commit ddc666ce8b95f34539864c0ddd87fee42123cbde
Showing 1 changed file with 6 additions and 0 deletions.
@@ -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

1 comment on commit ddc666c

@scottgonzalez
Copy link
Member

@scottgonzalez scottgonzalez commented on ddc666c Aug 27, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Still missing the blank line above the comment ;-)

Please sign in to comment.