From: jzaefferer Date: Tue, 31 Aug 2010 12:20:56 +0000 (+0200) Subject: Autocomplete: Store term when selecting an item to prevent another search triggered... X-Git-Tag: 1.8.5~39 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=dea2f8a7fc1d7c1d8fbf69aa50d7c1f28c3f35b6;p=jquery-ui.git Autocomplete: Store term when selecting an item to prevent another search triggered before blur. Fixes #5591 - Home and End keys trigger search --- diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js index e8796e41e..6cdbb4db7 100644 --- a/ui/jquery.ui.autocomplete.js +++ b/ui/jquery.ui.autocomplete.js @@ -163,6 +163,7 @@ $.widget( "ui.autocomplete", { } if ( false !== self._trigger( "select", event, { item: item } ) ) { + self.term = item.value; self.element.val( item.value ); }