Autocomplete: Store term when selecting an item to prevent another search triggered before blur. Fixes #5591 - Home and End keys trigger search

This commit is contained in:
jzaefferer 2010-08-31 14:20:56 +02:00
parent 90345b30d8
commit dea2f8a7fc

View File

@ -163,6 +163,7 @@ $.widget( "ui.autocomplete", {
} }
if ( false !== self._trigger( "select", event, { item: item } ) ) { if ( false !== self._trigger( "select", event, { item: item } ) ) {
self.term = item.value;
self.element.val( item.value ); self.element.val( item.value );
} }