Skip to content

Commit 2be4658

Browse files
committed
Autocomplete: fixed #5349 - Autocomplete: mouseover of menu item causes data loss
1 parent e6c30b0 commit 2be4658

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ui/jquery.ui.autocomplete.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ $.widget( "ui.autocomplete", {
117117
if ( self.element[0] !== doc.activeElement ) {
118118
self.element.focus();
119119
}
120+
},
121+
blur: function( event, ui ) {
122+
self.element.val( self.term );
120123
}
121124
})
122125
.zIndex( this.element.zIndex() + 1 )
@@ -379,6 +382,7 @@ $.widget("ui.menu", {
379382
this.active.children("a")
380383
.removeClass("ui-state-hover")
381384
.removeAttr("id");
385+
this._trigger("blur", null, {});
382386
this.active = null;
383387
},
384388

0 commit comments

Comments
 (0)