diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2010-02-16 16:20:05 +0000 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2010-02-16 16:20:05 +0000 |
commit | 4f4715017d140daf44522962de0823c6de80628c (patch) | |
tree | 38e64d18597bb6b1d8296d85b6073bdf1dc2c8e7 /ui/jquery.ui.autocomplete.js | |
parent | e6ccefe5cd3e58850a745b626835321058b77e7f (diff) | |
download | jquery-ui-4f4715017d140daf44522962de0823c6de80628c.tar.gz jquery-ui-4f4715017d140daf44522962de0823c6de80628c.zip |
Fix for #5188 along with a half-functional demo (buggy keyboard navigation)
Diffstat (limited to 'ui/jquery.ui.autocomplete.js')
-rw-r--r-- | ui/jquery.ui.autocomplete.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js index ff132cf8f..38b23fc9d 100644 --- a/ui/jquery.ui.autocomplete.js +++ b/ui/jquery.ui.autocomplete.js @@ -237,9 +237,7 @@ $.widget( "ui.autocomplete", { _suggest: function( items ) { var self = this, ul = this.menu.element.empty(); - $.each( items, function( index, item ) { - self._renderItem( ul, item ); - }); + this._renderMenu( ul, items ); // TODO refresh should check if the active item is still in the dom, removing the need for a manual deactivate this.menu.deactivate(); this.menu.refresh(); @@ -248,6 +246,13 @@ $.widget( "ui.autocomplete", { ul.width( this.element.width() ); } }, + + _renderMenu: function( ul, items ) { + var self = this; + $.each( items, function( index, item ) { + self._renderItem( ul, item ); + }); + }, _renderItem: function( ul, item) { return $( "<li></li>" ) |