From 1d80250af1a1959e739cc02a13576401b5f113f5 Mon Sep 17 00:00:00 2001 From: "jcampan@chromium.org" Date: Wed, 18 Feb 2009 00:46:20 +0000 Subject: 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 --- chrome/browser/jsmessage_box_handler_win.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'chrome/browser/jsmessage_box_handler_win.h') diff --git a/chrome/browser/jsmessage_box_handler_win.h b/chrome/browser/jsmessage_box_handler_win.h index 80beaa1..bac80dd 100644 --- a/chrome/browser/jsmessage_box_handler_win.h +++ b/chrome/browser/jsmessage_box_handler_win.h @@ -44,7 +44,7 @@ class JavascriptMessageBoxHandler // views::WindowDelegate Methods: virtual bool IsModal() const { return true; } virtual views::View* GetContentsView(); - virtual views::View* GetInitiallyFocusedView() const; + virtual views::View* GetInitiallyFocusedView(); private: // NotificationObserver implementation. -- cgit v1.1