]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixed #3018 - Opera tries to collapse menu bar with only one item in some cases
authorArtur Signell <artur.signell@itmill.com>
Tue, 26 May 2009 12:08:03 +0000 (12:08 +0000)
committerArtur Signell <artur.signell@itmill.com>
Tue, 26 May 2009 12:08:03 +0000 (12:08 +0000)
svn changeset:8021/svn branch:6.0

src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java

index b968390edb49a9bf3ea13bd291a7d85a3f093d5b..fb639ce29e9b27d9109b0acbc0a2ce36f51fd9c5 100644 (file)
@@ -189,7 +189,10 @@ public class VMenuBar extends Widget implements Paintable, PopupListener {
         }// while
 
         // we might need to collapse the top-level menu
-        if (collapseItems) {
+        // Only needed if there is more than 1 top level item
+        // TODO and if width is defined
+        if (collapseItems && getItems().size() > 1) {
+
             int topLevelWidth = 0;
 
             int ourWidth = getOffsetWidth();