Fix 4830: We navigate back after closing the Save As dialog.
commitd06d9474d6e76ecc124f0e1063fdcbabd48d7844
authorfinnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98>
Tue, 23 Dec 2008 04:32:34 +0000 (23 04:32 +0000)
committerfinnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98>
Tue, 23 Dec 2008 04:32:34 +0000 (23 04:32 +0000)
tree5bc144f077b55ee1f3a69a25f629660437db9392
parent1760972673ada52e7fae2827b16616451b5c6a2f
Fix 4830: We navigate back after closing the Save As dialog.

If you use Alt-Shift-T and the arrow keys to go to the Page menu
and then launch the Save Page As dialog, we would navigate back after
saving the page.

This is because once we close the Save As dialog with Enter, focus
goes to the Back button (which arguable is also wrong, see issue 5750)
and it receives a KeyRelease(Enter), which causes us to navigate back
right after saving the page.

In Windows, pressing Enter while a button has focus clicks the button
on KeyPressed, whereas we currently click the button on KeyRelease.

This patch makes Chrome mimic native Windows behavior. We retain
the current behavior for Space, however, which clicks on KeyReleased
in both Chrome and Windows.

BUG=4830
TEST=Native Chrome buttons should click buttons on KeyPress when using
Enter and on KeyRelease when using Space.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7406 0039d316-1c4b-4281-b951-d872f2087c98
chrome/views/base_button.cc