Comment #23 on issue 3380 by [email protected]: Window loses keyboard  
focus after dismissing open/save/print dialog
http://code.google.com/p/chromium/issues/detail?id=3380

The following revision refers to this bug:
     http://src.chromium.org/viewvc/chrome?view=rev&revision=26162

------------------------------------------------------------------------
r26162 | [email protected] | 2009-09-14 14:23:41 -0700 (Mon, 14 Sep  
2009) | 27 lines
Changed paths:
    M  
http://src.chromium.org/viewvc/chrome/branches/195/src/chrome/browser/views/shell_dialogs_win.cc?r1=26162&r2=26161
    M  
http://src.chromium.org/viewvc/chrome/branches/195/src/views/widget/widget_win.cc?r1=26162&r2=26161
    M  
http://src.chromium.org/viewvc/chrome/branches/195/src/views/widget/widget_win.h?r1=26162&r2=26161

Merge 26135 - The focus is not restored properly when a Windows modal dialog
(such as "open file', 'print'...) is closed.
We are running these dialogs from a different thread and they
cause the browser window to get activated before it has been
enabled. This causes the focus restoration to fail as the window
is not enabled.
In an earlier patch, I fixed it by storing/restoring the focus
explicitly before/after the dialog is shown.
But the fix did not apply to the print dialog which does not use
the code I added my fix in.

This CL reverts that previous fix and comes with a simpler solution:
if when we are about to restore focus the window is disabled, we
delay the focus restoration untill the window is enabled again.

BUG=3380
TEST=Set the focus on a page with scrollbars, rightclick to do a
     'save as'. Close the dialog. The arrow keys should let you scroll
     the page. Accelerators such as CtrlT should still work. Test
     'open a file', 'print' and the font selection dialog (in the options).
     When closing the dialog the focus should return to the view that last
     had focus.

Review URL: http://codereview.chromium.org/199106

[email protected]
Review URL: http://codereview.chromium.org/206004
------------------------------------------------------------------------


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---

Reply via email to