Skip to content

Commit d5d3a74

Browse files
committed
Autocomplete: Set isNewMenu flag on every suggestion. Fixes #9118 - Autocomplete: Mouse auto-highlights option in Firefox.
1 parent bcae4fb commit d5d3a74

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

ui/jquery.ui.autocomplete.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,8 @@ $.widget( "ui.autocomplete", {
234234
}
235235
},
236236
menufocus: function( event, ui ) {
237-
// #7024 - Prevent accidental activation of menu items in Firefox
237+
// support: Firefox
238+
// Prevent accidental activation of menu items in Firefox (#7024 #9118)
238239
if ( this.isNewMenu ) {
239240
this.isNewMenu = false;
240241
if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {
@@ -490,6 +491,7 @@ $.widget( "ui.autocomplete", {
490491
_suggest: function( items ) {
491492
var ul = this.menu.element.empty();
492493
this._renderMenu( ul, items );
494+
this.isNewMenu = true;
493495
this.menu.refresh();
494496

495497
// size and position menu

0 commit comments

Comments
 (0)