r3383 committed - autocomplete and menu: no default width for menu (set in visual test),...

r3383 committed - autocomplete and menu: no default width for menu (set in visual test),...


Revision: 3383
Author: joern.zaefferer
Date: Thu Oct 22 12:17:04 2009
Log: autocomplete and menu: no default width for menu (set in visual test),
let autocomplete set it to at least the input width
http://code.google.com/p/jquery-ui/source/detail?r=3383
Modified:
/branches/dev/tests/visual/menu/default.html
/branches/dev/themes/base/ui.menu.css
/branches/dev/ui/jquery.ui.autocomplete.js
=======================================
--- /branches/dev/tests/visual/menu/default.html    Sat Oct 17 05:04:47 2009
+++ /branches/dev/tests/visual/menu/default.html    Thu Oct 22 12:17:04 2009
@@ -29,6 +29,7 @@
    });
    </script>
    <style>
+        .ui-menu { width: 200px; }
        #menu2 { height: 200px; }
    </style>
</head>
=======================================
--- /branches/dev/themes/base/ui.menu.css    Sat Sep 26 04:12:14 2009
+++ /branches/dev/themes/base/ui.menu.css    Thu Oct 22 12:17:04 2009
@@ -1,6 +1,6 @@
/* Menu
----------------------------------*/
-.ui-menu { width: 200px; overflow: auto; list-style-position: outside;
list-style: none; padding: 0; margin: 0; list-style: none; padding: 0;
margin:.2em 0; display: block; }
+.ui-menu { overflow: auto; list-style-position: outside; list-style: none;
padding: 0; margin: 0; list-style: none; padding: 0; margin:.2em 0;
display: block; }
.ui-menu .ui-menu-item { margin: 0px; padding: 2px 5px; cursor: default;
display: block; font: menu; font-size: 12px; line-height: 16px; overflow:
hidden; border-collapse: collapse; margin: 0 .2em; display: block;
padding:0; line-height: 1.3em; }
.ui-menu .ui-menu-item a { text-decoration: none; display: block;
padding: .2em .4em; border: 1px dashed transparent; font-weight:
normal !important; }
=======================================
--- /branches/dev/ui/jquery.ui.autocomplete.js    Thu Oct 22 12:08:11 2009
+++ /branches/dev/ui/jquery.ui.autocomplete.js    Thu Oct 22 12:17:04 2009
@@ -168,6 +168,9 @@
            at: "left bottom",
            of: this.element
        });
+        if (ul.width() <= this.element.width()) {
+            ul.width(this.element.width());
+        }
    },
    move: function(direction) {