Skip to content
Permalink
Browse files

Autocomplete: Use .outerWidth() for determining the size of the menu.…

… Fixes #5832 - Autocomplete: menu has incorrect width.
  • Loading branch information...
scottgonzalez committed Jul 16, 2010
1 parent ba749ba commit 325a262b14aa41be9bda584d770eedbde47297b6
Showing with 7 additions and 3 deletions.
  1. +7 −3 ui/jquery.ui.autocomplete.js
@@ -276,9 +276,13 @@ $.widget( "ui.autocomplete", {
collision: "none"
});

menuWidth = ul.width( "" ).width();
textWidth = this.element.width();
ul.width( Math.max( menuWidth, textWidth ) );
menuWidth = ul.width( "" ).outerWidth();
textWidth = this.element.outerWidth();
ul.width( Math.max( menuWidth, textWidth )
- ( parseFloat( ul.css("paddingLeft") ) || 0 )
- ( parseFloat( ul.css("paddingRight") ) || 0 )
- ( parseFloat( ul.css("borderLeftWidth") ) || 0 )
- ( parseFloat( ul.css("borderRightWidth") ) || 0 ) );
},

_renderMenu: function( ul, items ) {

0 comments on commit 325a262

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