Skip to content

Commit 4cc61b4

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.
1 parent 6625060 commit 4cc61b4

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
@@ -452,7 +452,9 @@ $.widget( "ui.autocomplete", {
452452
_resizeMenu: function() {
453453
var ul = this.menu.element;
454454
ul.outerWidth( Math.max(
455-
ul.width( "" ).outerWidth(),
455+
// Firefox wraps long text (possibly a rounding bug)
456+
// so we add 1px to avoid the wrapping (#7513)
457+
ul.width( "" ).outerWidth() + 1,
456458
this.element.outerWidth()
457459
) );
458460
},

0 commit comments

Comments
 (0)