DescriptionSupport cmd-left/right for history.
Since cmd-left/right should not do history if the omnibox is focussed, but cmd-1-9 should work if the omnibox is focussed, we have to differentiate between window- and browser-level shortcuts.
(Because performKeyEquivalent bubbles up from the window -- and if we let it bubble up to the omnibox, then the omnibox handles cmd-left/right just fine, but it swallows cmd-1 and doesn't give us a chance to intercept this. That means cmd-left doesn't work if you hit cmd-l tab, which focusses something that's neither omnibox nor tab contents. This behavior is consistent with safari and camino, and I think it's the best we can do without rewriting event dispatching.
Camino does this here:
http://mxr.mozilla.org/seamonkey/source/camino/src/browser/BrowserWindow.mm#128
http://mxr.mozilla.org/seamonkey/source/camino/src/browser/BrowserWrapper.mm#1031
)
BUG=12557
TEST=Focus text box on a web page. cmd-left/right should go to start/end of text. Focus webpage background. cmd-left/right \
should go history back/forward. When the omnibox is focussed, cmd-left/right should move the caret, but cmd-1-9 should still switch tabs.
Note that shortcuts still don't work if a subwindow (e.g. find bar, bookmark bubble) has focus.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=28505
Patch Set 1 #Patch Set 2 : kinda works, but cmd-left/right in omnibox should move cursor (does history atm) #Patch Set 3 : Now full-assed! #Patch Set 4 : cleanups #Patch Set 5 : more cleanups #Patch Set 6 : test #Patch Set 7 : test #Patch Set 8 : merge tot #
Total comments: 15
Patch Set 9 : address comments #Patch Set 10 : One more comment #
Total comments: 4
Patch Set 11 : comments #
Total comments: 4
Messages
Total messages: 8 (0 generated)
|