diff options
author | jennyz@chromium.org <jennyz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-26 01:02:40 +0000 |
---|---|---|
committer | jennyz@chromium.org <jennyz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-26 01:02:40 +0000 |
commit | de7782c11e2afac2511c3b9932981532917e1f72 (patch) | |
tree | 8386ef176c803b32f3081a3af063109dfef2cc1d /ui/views/widget | |
parent | 9eac0d2da1028a20da3d168ee192bb94a19b65cf (diff) | |
download | chromium_src-de7782c11e2afac2511c3b9932981532917e1f72.zip chromium_src-de7782c11e2afac2511c3b9932981532917e1f72.tar.gz chromium_src-de7782c11e2afac2511c3b9932981532917e1f72.tar.bz2 |
Fix the HtmlDialogView initial focus issue.
For HtmlDialogView case, when NativeWidgetAura::ShowWithWindowState() is called when dialog is shown, can_activate_ is true, but the window state is not ui::SHOW_STATE_INACTIVE, instead, it is ui::SHOW_STATE_DEFAULT, therefore, GetWidget()->SetInitialFocus() is never called to set the initial focus to web UI of HtmlDialog.
BUG=110522
TEST=Print dialog should have initial foucs on its web UI part.
Review URL: http://codereview.chromium.org/9249044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119159 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/widget')
-rw-r--r-- | ui/views/widget/native_widget_aura.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/views/widget/native_widget_aura.cc b/ui/views/widget/native_widget_aura.cc index ae51c99..71d25cb 100644 --- a/ui/views/widget/native_widget_aura.cc +++ b/ui/views/widget/native_widget_aura.cc @@ -448,9 +448,9 @@ void NativeWidgetAura::ShowWithWindowState(ui::WindowShowState state) { window_->SetIntProperty(aura::client::kShowStateKey, state); } window_->Show(); - if (can_activate_ && (state != ui::SHOW_STATE_INACTIVE || - !GetWidget()->SetInitialFocus())) { + if (can_activate_ && state != ui::SHOW_STATE_INACTIVE) { Activate(); + GetWidget()->SetInitialFocus(); } } |