]> source.dussan.org Git - jquery-ui.git/commitdiff
Autocomplete: Add 1px to the width of the menu to avoid wrapping in Firefox. Fixes...
authorScott González <scott.gonzalez@gmail.com>
Tue, 25 Oct 2011 21:19:26 +0000 (17:19 -0400)
committerScott González <scott.gonzalez@gmail.com>
Tue, 25 Oct 2011 21:20:56 +0000 (17:20 -0400)
(cherry picked from commit 4cc61b459d73af78dd40f01e3250f2546d9f04bd)

ui/jquery.ui.autocomplete.js

index 1ad9f22bc701d1c30229452269f5566c164a06dc..bc32bb9878eb9c61893334631b8a64059c318281 100644 (file)
@@ -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()
                ) );
        },