summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/views/widget/native_widget_aura.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc
index b9ff0a2..4d7a396 100644
--- a/ui/views/widget/native_widget_aura.cc
+++ b/ui/views/widget/native_widget_aura.cc
@@ -663,8 +663,10 @@ bool NativeWidgetAura::OnKeyEvent(aura::KeyEvent* event) {
// Windows). In this case, we just skip these.
return false;
}
-
- DCHECK(window_->IsVisible());
+ // Renderer may send a key event back to us if the key event wasn't handled,
+ // and the window may be invisible by that time.
+ if (!window_->IsVisible())
+ return false;
InputMethod* input_method = GetWidget()->GetInputMethod();
DCHECK(input_method);
KeyEvent views_event(event);