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

This commit is contained in:
Scott González 2011-10-25 17:19:26 -04:00
parent 6625060d83
commit 4cc61b459d

View File

@ -452,7 +452,9 @@ $.widget( "ui.autocomplete", {
_resizeMenu: function() {
var ul = this.menu.element;
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()
) );
},