Autocomplete: Don't react to menu blurs. Fixes #7742 - Autocomplete: Blur should not change the value of the input.

This commit is contained in:
Scott González 2011-10-12 13:38:38 -04:00
parent 56bcf885c6
commit ea19645c20

View File

@ -244,14 +244,6 @@ $.widget( "ui.autocomplete", {
self.close( event );
self.selectedItem = item;
},
blur: function( event, ui ) {
// don't set the value of the text field if it's already correct
// this prevents moving the cursor unnecessarily
if ( self.menu.element.is(":visible") &&
( self._value() !== self.term ) ) {
self._value( self.term );
}
}
})
.zIndex( this.element.zIndex() + 1 )