From ddc666ce8b95f34539864c0ddd87fee42123cbde Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jo=CC=88rn=20Zaefferer?= Date: Wed, 27 Aug 2014 13:27:06 -0300 Subject: [PATCH] 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 --- ui/menu.js | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- 2.39.5