Skip to content
Permalink
Browse files

Autocomplete: Resize menu on every suggestion.

  • Loading branch information...
scottgonzalez committed Mar 11, 2010
1 parent 493e039 commit c2ed8ffc07903855d67c8a446beeedff96fb5af6
Showing with 4 additions and 3 deletions.
  1. +4 −3 ui/jquery.ui.autocomplete.js
@@ -246,9 +246,10 @@ $.widget( "ui.autocomplete", {
of: this.element,
collision: "none"
});
if ( ul.width() <= this.element.width() ) {
ul.width( this.element.width() );
}

var menuWidth = ul.width( "" ).width(),
textWidth = this.element.width();
ul.width( Math.max( menuWidth, textWidth ) );
},

_renderMenu: function( ul, items ) {

0 comments on commit c2ed8ff

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