]> 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:19:26 +0000 (17:19 -0400)
ui/jquery.ui.autocomplete.js

index 5dda7d97085dd83f6181c3a510ac87f9b543f71f..4e528dce43ff35fe0dcc17f951fc0e0fe5992135 100644 (file)
@@ -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()
                ) );
        },