]> source.dussan.org Git - jquery-ui.git/commitdiff
Autocomplete: Set isNewMenu flag on every suggestion. Fixes #9118 - Autocomplete...
authorScott González <scott.gonzalez@gmail.com>
Mon, 25 Feb 2013 20:36:08 +0000 (15:36 -0500)
committerScott González <scott.gonzalez@gmail.com>
Mon, 25 Feb 2013 20:36:08 +0000 (15:36 -0500)
ui/jquery.ui.autocomplete.js

index 1b0f2138f9467d3bda9bb3ceaa4677b646634cf3..b3a05da0bac91e86f28e8c1c7fb1246b55c708c8 100644 (file)
@@ -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