summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/html_dialog_view.cc
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-18 00:46:20 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-18 00:46:20 +0000
commit1d80250af1a1959e739cc02a13576401b5f113f5 (patch)
treeb3397de1f1175aae3b27b9dc75aa99f92c31502c /chrome/browser/views/html_dialog_view.cc
parent9ef017bc62963d792e42868576837129d71354f8 (diff)
downloadchromium_src-1d80250af1a1959e739cc02a13576401b5f113f5.zip
chromium_src-1d80250af1a1959e739cc02a13576401b5f113f5.tar.gz
chromium_src-1d80250af1a1959e739cc02a13576401b5f113f5.tar.bz2
HtmlDialogs had focus problems.
They would not be focused when shown and tab traversal was not working. This was caused by several issues: - HWNDView was not focusing its HWND when focused through the View::RequestFocus() method (it would rely on the default view behavior which is to focus the root view HWND), so it would not be focused by default. - DOMView (parent of HtmlDialogView) was not focusable so would not get the focus when pressing tab. - DOMView was not eating tab keys events (by returning false in View::CanProcessTabKeyEvents()), so the render view would not get the tab key press messages (for focus traversal in the render view). Note: most of the file changes in this CL are just the consequence of changing the constness of the WindowDelegate::GetInitiallyFocusedView method. BUG=6859 TEST=Open a web page, from the page menu, select the "Create application shortcut..." menu. In the dialog, press the TAB key, focus should alternate between the different fields Review URL: http://codereview.chromium.org/21439 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9925 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/html_dialog_view.cc')
-rw-r--r--chrome/browser/views/html_dialog_view.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/chrome/browser/views/html_dialog_view.cc b/chrome/browser/views/html_dialog_view.cc
index 58f9efe..2ff93b7 100644
--- a/chrome/browser/views/html_dialog_view.cc
+++ b/chrome/browser/views/html_dialog_view.cc
@@ -61,6 +61,10 @@ views::View* HtmlDialogView::GetContentsView() {
return this;
}
+views::View* HtmlDialogView::GetInitiallyFocusedView() {
+ return this;
+}
+
////////////////////////////////////////////////////////////////////////////////
// HtmlDialogContentsDelegate implementation: