Autocomplete: Add 1px to the width of the menu to avoid wrapping in Firefox. Fixes #7513 - Autocomplete: long text wraps in Firefox.

(cherry picked from commit 4cc61b459d)
This commit is contained in:
Scott González 2011-10-25 17:19:26 -04:00
parent 39e75ade1d
commit 757384b8c5

View File

@ -383,7 +383,9 @@ $.widget( "ui.autocomplete", {
_resizeMenu: function() { _resizeMenu: function() {
var ul = this.menu.element; var ul = this.menu.element;
ul.outerWidth( Math.max( ul.outerWidth( Math.max(
ul.width( "" ).outerWidth(), // Firefox wraps long text (possibly a rounding bug)
// so we add 1px to avoid the wrapping (#7513)
ul.width( "" ).outerWidth() + 1,
this.element.outerWidth() this.element.outerWidth()
) ); ) );
}, },