From fd4b6b2b9b4e4052df5f4689a236cefb3b8469b5 Mon Sep 17 00:00:00 2001 From: Jouni Koivuviita Date: Fri, 20 May 2011 12:26:01 +0000 Subject: [PATCH] Reverted the fix for #5535 again, creating a proper ticket for the issue (need to indicate focus on menubar) svn changeset:18972/svn branch:6.6 --- .../terminal/gwt/client/ui/VMenuBar.java | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java b/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java index 932a54cd5b..44870ef350 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java @@ -90,12 +90,6 @@ public class VMenuBar extends SimpleFocusablePanel implements Paintable, private boolean openRootOnHover; - /* - * Flag to disable first root item selection when clicking on the menubar - * (tabbing to the menubar should select the first item) - */ - private boolean preventFocusSelection = false; - public VMenuBar() { // Create an empty horizontal menubar this(false, null); @@ -486,7 +480,6 @@ public class VMenuBar extends SimpleFocusablePanel implements Paintable, while (parent.getParentMenu() != null) { parent = parent.getParentMenu(); } - preventFocusSelection = true; parent.setFocus(true); } @@ -511,7 +504,6 @@ public class VMenuBar extends SimpleFocusablePanel implements Paintable, while (parent.getParentMenu() != null) { parent = parent.getParentMenu(); } - preventFocusSelection = true; parent.setFocus(true); } } @@ -561,9 +553,7 @@ public class VMenuBar extends SimpleFocusablePanel implements Paintable, * @param item */ public void itemOver(CustomMenuItem item) { - preventFocusSelection = true; if ((openRootOnHover || subMenu || menuVisible) && !item.isSeparator()) { - preventFocusSelection = true; setSelected(item); if (!subMenu && openRootOnHover && !menuVisible) { menuVisible = true; // start opening menus @@ -1442,19 +1432,7 @@ public class VMenuBar extends SimpleFocusablePanel implements Paintable, * .dom.client.FocusEvent) */ public void onFocus(FocusEvent event) { - if (!preventFocusSelection) { - setSelected(items.get(0)); - } - preventFocusSelection = false; - } - @Override - public void setFocus(boolean focus) { - super.setFocus(focus); - if (!focus) { - setSelected(null); - preventFocusSelection = false; - } } private final String SUBPART_PREFIX = "item"; -- 2.39.5