Skip to content
Permalink
Browse files

Autocomplete: Fix for #5154

  • Loading branch information
jzaefferer committed Feb 10, 2010
1 parent 5eeaa65 commit 3875cd33b739b9908fe51eaa4f0b4b939e700e10
Showing with 4 additions and 0 deletions.
  1. +4 −0 ui/jquery.ui.autocomplete.js
@@ -240,6 +240,7 @@ $.widget( "ui.autocomplete", {
$.each( items, function( index, item ) {
self._renderItem( ul, item );
});
this.menu.deactivate();
this.menu.refresh();
this.menu.element.show();
if ( ul.width() <= this.element.width() ) {
@@ -255,12 +256,15 @@ $.widget( "ui.autocomplete", {
},

_move: function( direction, event ) {
console.log("move " + direction + " with event " + event)
if ( !this.menu.element.is(":visible") ) {
console.log("move, menu not visible")
this.search( null, event );
return;
}
if ( this.menu.first() && /^previous/.test(direction) ||
this.menu.last() && /^next/.test(direction) ) {
console.log("move, first or last")
this.element.val( this.term );
this.menu.deactivate();
return;

0 comments on commit 3875cd3

Please sign in to comment.
You can’t perform that action at this time.