diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2014-08-27 13:27:06 -0300 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2014-08-27 13:44:08 -0300 |
commit | ddc666ce8b95f34539864c0ddd87fee42123cbde (patch) | |
tree | cd8d72092d533554aa603f3a52136a7ca1b29a57 /ui/menu.js | |
parent | 1abf9fc71f11996168fd81da7ebf25218f5ad4a4 (diff) | |
download | jquery-ui-ddc666ce8b95f34539864c0ddd87fee42123cbde.tar.gz jquery-ui-ddc666ce8b95f34539864c0ddd87fee42123cbde.zip |
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
Diffstat (limited to 'ui/menu.js')
-rw-r--r-- | ui/menu.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/menu.js b/ui/menu.js index 479ff5a18..4dfa0d37a 100644 --- a/ui/menu.js +++ b/ui/menu.js @@ -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 |