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 with 6 additions and 0 deletions.
  1. +6 −0 ui/menu.js
View
@@ -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

This comment has been minimized.

Show comment
Hide comment
@scottgonzalez

scottgonzalez Aug 27, 2014

Member

Still missing the blank line above the comment ;-)

Member

scottgonzalez commented on ddc666c Aug 27, 2014

Still missing the blank line above the comment ;-)

Please sign in to comment.