| Index: views/widget/native_widget_aura.cc
|
| diff --git a/views/widget/native_widget_aura.cc b/views/widget/native_widget_aura.cc
|
| index de95a18bba5afa5fc78121cd84cc70721953d381..6c0f1695a14b2e2cd9978e318287c3143bf3edc5 100644
|
| --- a/views/widget/native_widget_aura.cc
|
| +++ b/views/widget/native_widget_aura.cc
|
| @@ -419,7 +419,8 @@ void NativeWidgetAura::SetCursor(gfx::NativeCursor cursor) {
|
| }
|
|
|
| void NativeWidgetAura::ClearNativeFocus() {
|
| - NOTIMPLEMENTED();
|
| + if (window_ && window_->GetFocusManager())
|
| + window_->GetFocusManager()->SetFocusedWindow(window_);
|
| }
|
|
|
| void NativeWidgetAura::FocusNativeView(gfx::NativeView native_view) {
|
| @@ -440,7 +441,10 @@ gfx::Rect NativeWidgetAura::GetWorkAreaBoundsInScreen() const {
|
| // NativeWidgetAura, views::InputMethodDelegate implementation:
|
|
|
| void NativeWidgetAura::DispatchKeyEventPostIME(const KeyEvent& key) {
|
| - delegate_->OnKeyEvent(key);
|
| + if (delegate_->OnKeyEvent(key))
|
| + return;
|
| + if (key.type() == ui::ET_KEY_PRESSED && GetWidget()->GetFocusManager())
|
| + GetWidget()->GetFocusManager()->OnKeyEvent(key);
|
| }
|
|
|
| ////////////////////////////////////////////////////////////////////////////////
|
| @@ -458,7 +462,8 @@ void NativeWidgetAura::OnFocus() {
|
| InputMethod* input_method = widget->GetInputMethod();
|
| input_method->OnFocus();
|
| // See description of got_initial_focus_in_ for details on this.
|
| - widget->GetFocusManager()->RestoreFocusedView();
|
| + // TODO(mazda): Investigate this is actually necessary.
|
| + // widget->GetFocusManager()->RestoreFocusedView();
|
| }
|
| delegate_->OnNativeFocus(window_);
|
| }
|
|
|