diff options
author | suzhe@chromium.org <suzhe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-23 01:15:33 +0000 |
---|---|---|
committer | suzhe@chromium.org <suzhe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-23 01:15:33 +0000 |
commit | ed8bf13bccd28196fa2e1ddd30dc98a100167919 (patch) | |
tree | e721a87554d87716db83adcbdcc6c1cdeb109f60 /chrome/browser/chromeos | |
parent | 9febdb951b2a75ae69c2b2153c94ee5be86bb3ed (diff) | |
download | chromium_src-ed8bf13bccd28196fa2e1ddd30dc98a100167919.zip chromium_src-ed8bf13bccd28196fa2e1ddd30dc98a100167919.tar.gz chromium_src-ed8bf13bccd28196fa2e1ddd30dc98a100167919.tar.bz2 |
Fix conflicts between accelerator keys and HTML DOM accesskeys.
This CL fixes conflicts between accelerator keys and HTML DOM accesskeys by suppressing Char events if corresponding RawKeyDown event was handled by the browser after returning from the renderer unhandled.
This CL not only fixes this conflict issue, but also makes the behavior of handling accelerator keys similar than IE, which also suppresses a key press event if the key down event was handled as an accelerator key.
BUG=21624 accesskey attributes conflict with browser shortcuts (like tab-switching)
TEST=Open http://djmitche.github.com/buildbot/docs/0.7.11/ in one of opened multiple tabs, switch to another tab by pressing an alt-# key binding, then switch back to the original page to see if it's just as you left it before switching tabs.
Review URL: http://codereview.chromium.org/235039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29857 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos')
-rw-r--r-- | chrome/browser/chromeos/main_menu.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/chromeos/main_menu.h b/chrome/browser/chromeos/main_menu.h index 11e9942..c432c4b 100644 --- a/chrome/browser/chromeos/main_menu.h +++ b/chrome/browser/chromeos/main_menu.h @@ -162,7 +162,9 @@ class MainMenu : public RenderViewHostDelegate, virtual bool IsReservedAccelerator(const NativeWebKeyboardEvent& event) { return false; } - virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event) {} + virtual bool HandleKeyboardEvent(const NativeWebKeyboardEvent& event) { + return false; + } virtual void HandleMouseEvent() {} virtual void HandleMouseLeave() {} virtual void UpdatePreferredSize(const gfx::Size& pref_size) {} |