aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2011-10-25 17:19:26 -0400
committerScott González <scott.gonzalez@gmail.com>2011-10-25 17:20:56 -0400
commit757384b8c5eb1ccf354f9ab98fcb3b0e6cae6e1d (patch)
tree715885f3bc6401a2250d274725dea5ce150dfbc5
parent39e75ade1de8c37f120fc13aadc048c23211138c (diff)
downloadjquery-ui-757384b8c5eb1ccf354f9ab98fcb3b0e6cae6e1d.tar.gz
jquery-ui-757384b8c5eb1ccf354f9ab98fcb3b0e6cae6e1d.zip
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)
-rw-r--r--ui/jquery.ui.autocomplete.js4
1 files changed, 3 insertions, 1 deletions
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()
) );
},