Skip to content

Commit 757384b

Browse files
committed
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 4cc61b4)
1 parent 39e75ad commit 757384b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ui/jquery.ui.autocomplete.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,9 @@ $.widget( "ui.autocomplete", {
383383
_resizeMenu: function() {
384384
var ul = this.menu.element;
385385
ul.outerWidth( Math.max(
386-
ul.width( "" ).outerWidth(),
386+
// Firefox wraps long text (possibly a rounding bug)
387+
// so we add 1px to avoid the wrapping (#7513)
388+
ul.width( "" ).outerWidth() + 1,
387389
this.element.outerWidth()
388390
) );
389391
},

0 commit comments

Comments
 (0)