From 757384b8c5eb1ccf354f9ab98fcb3b0e6cae6e1d 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. (cherry picked from commit 4cc61b459d73af78dd40f01e3250f2546d9f04bd) --- 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 1ad9f22bc..bc32bb987 100644 --- a/ui/jquery.ui.autocomplete.js +++ b/ui/jquery.ui.autocomplete.js @@ -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() ) ); }, -- 2.39.5