Skip to content
Permalink
Browse files

Autocomplete: Set isNewMenu flag on every suggestion. Fixes #9118 - A…

…utocomplete: Mouse auto-highlights option in Firefox.
  • Loading branch information...
scottgonzalez committed Feb 25, 2013
1 parent bcae4fb commit d5d3a745b00dd476195cf25b35cc02f3bc31f814
Showing with 3 additions and 1 deletion.
  1. +3 −1 ui/jquery.ui.autocomplete.js
@@ -234,7 +234,8 @@ $.widget( "ui.autocomplete", {
}
},
menufocus: function( event, ui ) {
// #7024 - Prevent accidental activation of menu items in Firefox
// support: Firefox
// Prevent accidental activation of menu items in Firefox (#7024 #9118)
if ( this.isNewMenu ) {
this.isNewMenu = false;
if ( event.originalEvent && /^mouse/.test( event.originalEvent.type ) ) {
@@ -490,6 +491,7 @@ $.widget( "ui.autocomplete", {
_suggest: function( items ) {
var ul = this.menu.element.empty();
this._renderMenu( ul, items );
this.isNewMenu = true;
this.menu.refresh();

// size and position menu

0 comments on commit d5d3a74

Please sign in to comment.
You can’t perform that action at this time.