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

Unified Diff: ui/views/widget/native_widget_aura.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: Do StopPropagation() in DNWA/NWA. 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/desktop_aura/desktop_native_widget_aura.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/native_widget_aura.cc
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index 12b6255aef37b20057298db70b940b3f7b58f890..dee6677b3a0d2600d45b08a9bdc108147e0219fc 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -875,8 +875,10 @@ void NativeWidgetAura::OnKeyEvent(ui::KeyEvent* event) {
FocusManager* focus_manager = GetWidget()->GetFocusManager();
delegate_->OnKeyEvent(event);
- if (!event->handled() && focus_manager)
- focus_manager->OnKeyEvent(*event);
+ if (!event->handled() && focus_manager) {
+ if (!focus_manager->OnKeyEvent(*event))
+ event->StopPropagation();
+ }
sadrul 2016/02/17 21:17:55 Should this code just move into Widget::OnKeyEvent
Shu Chen 2016/02/18 00:29:54 Done. Good idea.
event->SetHandled();
}
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_native_widget_aura.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698