Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(911)

Unified Diff: views/controls/button/menu_button.cc

Issue 2817022: Small tweaks to improve toolbar keyboard accessibility: Put focus rects... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: views/controls/button/menu_button.cc
===================================================================
--- views/controls/button/menu_button.cc (revision 50343)
+++ views/controls/button/menu_button.cc (working copy)
@@ -226,6 +226,13 @@
return false;
}
+bool MenuButton::OnKeyReleased(const KeyEvent& e) {
+ // Override CustomButton's implementation, which presses the button when
+ // you press space and clicks it when you release space. For a MenuButton
+ // we always activate the menu on key press.
+ return false;
+}
+
// The reason we override View::OnMouseExited is because we get this event when
// we display the menu. If we don't override this method then
// BaseButton::OnMouseExited will get the event and will set the button's state

Powered by Google App Engine
This is Rietveld 408576698