mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-10-05 01:44:18 +00:00
Autocomplete: Always reset this.term after a select event, even if the select is cancelled. Fixes #6221 - Autocomplete: Doesn't reset after Select when textbox cleared, if same letters typed in rapidly; source function not triggered in that case.
This commit is contained in:
parent
a0847f3a08
commit
5c67ed26e8
4
ui/jquery.ui.autocomplete.js
vendored
4
ui/jquery.ui.autocomplete.js
vendored
@ -181,9 +181,11 @@ $.widget( "ui.autocomplete", {
|
||||
}
|
||||
|
||||
if ( false !== self._trigger( "select", event, { item: item } ) ) {
|
||||
self.term = item.value;
|
||||
self.element.val( item.value );
|
||||
}
|
||||
// reset the term after the select event
|
||||
// this allows custom select handling to work properly
|
||||
self.term = self.element.val();
|
||||
|
||||
self.close( event );
|
||||
self.selectedItem = item;
|
||||
|
Loading…
Reference in New Issue
Block a user