diff options
author | Scott González <scott.gonzalez@gmail.com> | 2010-07-16 14:12:06 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2010-07-16 14:12:06 -0400 |
commit | 325a262b14aa41be9bda584d770eedbde47297b6 (patch) | |
tree | 6b6b0bd24bbbd5e99763ae583eee877d952cf3db /ui/jquery.ui.autocomplete.js | |
parent | ba749ba6836d4889f18166a1207d5eeccddf7083 (diff) | |
download | jquery-ui-325a262b14aa41be9bda584d770eedbde47297b6.tar.gz jquery-ui-325a262b14aa41be9bda584d770eedbde47297b6.zip |
Autocomplete: Use .outerWidth() for determining the size of the menu. Fixes #5832 - Autocomplete: menu has incorrect width.
Diffstat (limited to 'ui/jquery.ui.autocomplete.js')
-rw-r--r-- | ui/jquery.ui.autocomplete.js | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js index 1a51baa8d..3fa196ecb 100644 --- a/ui/jquery.ui.autocomplete.js +++ b/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 ) { |