From 4cc61b459d73af78dd40f01e3250f2546d9f04bd Mon Sep 17 00:00:00 2001 From: =?utf8?q?Scott=20Gonz=C3=A1lez?= Date: Tue, 25 Oct 2011 17:19:26 -0400 Subject: [PATCH] Autocomplete: Add 1px to the width of the menu to avoid wrapping in Firefox. Fixes #7513 - Autocomplete: long text wraps in Firefox. --- ui/jquery.ui.autocomplete.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/jquery.ui.autocomplete.js b/ui/jquery.ui.autocomplete.js index 5dda7d970..4e528dce4 100644 --- a/ui/jquery.ui.autocomplete.js +++ b/ui/jquery.ui.autocomplete.js @@ -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() ) ); }, -- 2.39.5