aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/jquery.ui.autocomplete.js4
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;