diff options
author | Scott González <scott.gonzalez@gmail.com> | 2010-10-25 10:01:43 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2010-10-25 10:01:43 -0400 |
commit | 5c67ed26e8c36c42c9f149fcfb2f5fe9e1192b26 (patch) | |
tree | 298ee0a197d2e053fc0069181dc00318d58890e9 /ui/jquery.ui.autocomplete.js | |
parent | a0847f3a08dfc259d8ba7f6ba7da16653cf15183 (diff) | |
download | jquery-ui-5c67ed26e8c36c42c9f149fcfb2f5fe9e1192b26.tar.gz jquery-ui-5c67ed26e8c36c42c9f149fcfb2f5fe9e1192b26.zip |
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.
Diffstat (limited to 'ui/jquery.ui.autocomplete.js')
-rw-r--r-- | ui/jquery.ui.autocomplete.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js index 427ad1a5a..0ada32f02 100644 --- a/ui/jquery.ui.autocomplete.js +++ b/ui/jquery.ui.autocomplete.js @@ -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; |