mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Autocomplete: fixed #5349 - Autocomplete: mouseover of menu item causes data loss
This commit is contained in:
parent
e6c30b0d97
commit
2be46581da
4
ui/jquery.ui.autocomplete.js
vendored
4
ui/jquery.ui.autocomplete.js
vendored
@ -117,6 +117,9 @@ $.widget( "ui.autocomplete", {
|
|||||||
if ( self.element[0] !== doc.activeElement ) {
|
if ( self.element[0] !== doc.activeElement ) {
|
||||||
self.element.focus();
|
self.element.focus();
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
blur: function( event, ui ) {
|
||||||
|
self.element.val( self.term );
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.zIndex( this.element.zIndex() + 1 )
|
.zIndex( this.element.zIndex() + 1 )
|
||||||
@ -379,6 +382,7 @@ $.widget("ui.menu", {
|
|||||||
this.active.children("a")
|
this.active.children("a")
|
||||||
.removeClass("ui-state-hover")
|
.removeClass("ui-state-hover")
|
||||||
.removeAttr("id");
|
.removeAttr("id");
|
||||||
|
this._trigger("blur", null, {});
|
||||||
this.active = null;
|
this.active = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user