Skip to content

Commit

Permalink
Autocomplete: Add 1px to the width of the menu to avoid wrapping in F…
Browse files Browse the repository at this point in the history
…irefox. Fixes #7513 - Autocomplete: long text wraps in Firefox.

(cherry picked from commit 4cc61b4)
  • Loading branch information
scottgonzalez committed Oct 25, 2011
1 parent 39e75ad commit 757384b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui/jquery.ui.autocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,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()
) );
},
Expand Down

0 comments on commit 757384b

Please sign in to comment.