Index: ui/views/controls/button/menu_button.cc |
diff --git a/ui/views/controls/button/menu_button.cc b/ui/views/controls/button/menu_button.cc |
index 6ad0aa2f80cbad90f7a94377f5ee8300e247bbbb..0f6a393186f6d8e58b3a824ef49e72be9c7b91d8 100644 |
--- a/ui/views/controls/button/menu_button.cc |
+++ b/ui/views/controls/button/menu_button.cc |
@@ -220,16 +220,12 @@ bool MenuButton::OnKeyPressed(const ui::KeyEvent& event) { |
case ui::VKEY_UP: |
case ui::VKEY_DOWN: { |
// WARNING: we may have been deleted by the time Activate returns. |
- bool ret = Activate(); |
-#if defined(USE_AURA) |
- // This is to prevent the keyboard event from being dispatched twice. |
- // The Activate function returns false in most cases. In AURA if the |
- // keyboard event is not handled, we pass it to the default handler |
- // which dispatches the event back to us causing the menu to get |
- // displayed again. |
- ret = true; |
-#endif |
- return ret; |
+ Activate(); |
+ // This is to prevent the keyboard event from being dispatched twice. If |
+ // the keyboard event is not handled, we pass it to the default handler |
+ // which dispatches the event back to us causing the menu to get displayed |
+ // again. Return true to prevent this. |
+ return true; |
} |
default: |
break; |