summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Koivuviita <jouni.koivuviita@itmill.com>2011-05-20 12:26:01 +0000
committerJouni Koivuviita <jouni.koivuviita@itmill.com>2011-05-20 12:26:01 +0000
commitfd4b6b2b9b4e4052df5f4689a236cefb3b8469b5 (patch)
tree89e8b26761b63fb200aa71b960690fd1c863d31d
parent51603fe898c645d5b2f3964c76ee0bb72fef7a02 (diff)
downloadvaadin-framework-fd4b6b2b9b4e4052df5f4689a236cefb3b8469b5.tar.gz
vaadin-framework-fd4b6b2b9b4e4052df5f4689a236cefb3b8469b5.zip
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
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VMenuBar.java22
1 files changed, 0 insertions, 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";