Updates: Cc: su...@chromium.org Comment #5 on issue 21624 by su...@chromium.org: accesskey attributes conflict with browser shortcuts (like tab-switching) http://code.google.com/p/chromium/issues/detail?id=21624
Please note that accesskey is triggered by Char event rather than RawKeyDown event. In our keyboard event handling flow, A RawKeyDown event will be sent to renderer without waiting for ACK from renderer, then the Char event corresponding to the RawKeyDown event will be sent to renderer without checking if the RawKeyDown event was handled by either renderer or browser (as accelerator key). And in renderer, a Char event will be suppressed only if the corresponding RawKeyDown event was handled by webkit and it's not a system key event. You may refer to the code of WebViewImpl::KeyEvent() method. Thus, if a RawKeyDown event is an accelerator key, it'll be handled by browser if it's not handled or blocked in renderer, and in this case, the corresponding Char event will still be handled by renderer and will lead strange behaviors like the one mentioned in this issue. Issue http://code.google.com/p/chromium/issues/detail?id=21471 is another example, though it can be worked around by CL http://codereview.chromium.org/195062. Possible solutions for this issue: 1. Change the keyboard event handling flow to avoid sending a Char event to renderer if corresponding RawKeyDown event was handled by either browser or renderer. This solution may need massive code change to renderer_host and browser and may cause many regressions. 2. Change HandleKeyboardEvent method of TabContentsView to activate accelerators by Char events rather than RawKeyDown event. It should be doable for Linux, but not sure if it's feasible for Windows and Mac. -- 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 -~----------~----~----~----~------~----~------~--~---