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

Unified Diff: chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc

Issue 1947533003: Second try at fixing location bar icon keyboard activation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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: chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc
diff --git a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc
index 67c376a36ef63f1191553e32087da0ae13ec0315..88acf5493217afa34a172b46759624ae99a4ccaf 100644
--- a/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc
+++ b/chrome/browser/ui/views/location_bar/icon_label_bubble_view.cc
@@ -128,10 +128,16 @@ gfx::Size IconLabelBubbleView::GetPreferredSize() const {
return GetSizeForLabelWidth(label_->GetPreferredSize().width());
}
+bool IconLabelBubbleView::OnKeyPressed(const ui::KeyEvent& event) {
+ if (event.key_code() == ui::VKEY_RETURN)
+ return OnActivate();
+ return false;
Peter Kasting 2016/05/04 02:21:00 BubbleIconView::OnKeyPressed() returned true for s
Evan Stade 2016/05/04 02:45:52 yea, this one isn't right; it should show a ripple
+}
+
bool IconLabelBubbleView::OnKeyReleased(const ui::KeyEvent& event) {
- if (event.key_code() != ui::VKEY_RETURN && event.key_code() != ui::VKEY_SPACE)
- return false;
- return OnActivate();
+ if (event.key_code() == ui::VKEY_SPACE)
+ return OnActivate();
+ return false;
}
void IconLabelBubbleView::Layout() {

Powered by Google App Engine
This is Rietveld 408576698