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

Unified Diff: ui/views/widget/widget.cc

Issue 1703683003: The key event should be stopped propagation when it's been processed as an accelerator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CQ green. Created 4 years, 10 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
« no previous file with comments | « ui/views/widget/native_widget_aura.cc ('k') | ui/views/widget/widget_interactive_uitest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/widget.cc
diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc
index 88a68dad587ba9335b3ceeff9c14a641e6b1f2f5..84fa83ec405f0798088bfc086b551bf89640e846 100644
--- a/ui/views/widget/widget.cc
+++ b/ui/views/widget/widget.cc
@@ -1162,6 +1162,10 @@ int Widget::GetNonClientComponent(const gfx::Point& point) {
void Widget::OnKeyEvent(ui::KeyEvent* event) {
SendEventToProcessor(event);
+ if (!event->handled() && GetFocusManager() &&
+ !GetFocusManager()->OnKeyEvent(*event)) {
+ event->StopPropagation();
+ }
}
// TODO(tdanderson): We should not be calling the OnMouse*() functions on
« no previous file with comments | « ui/views/widget/native_widget_aura.cc ('k') | ui/views/widget/widget_interactive_uitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698