mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Autocomplete: Set isNewMenu flag on every suggestion. Fixes #9118 - Autocomplete: Mouse auto-highlights option in Firefox.
This commit is contained in:
parent
bcae4fb9f1
commit
d5d3a745b0
4
ui/jquery.ui.autocomplete.js
vendored
4
ui/jquery.ui.autocomplete.js
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user