mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 249735 - Let F6 focus the location bar instead of the first focusable element. r=enn
This commit is contained in:
parent
80f7f0700f
commit
ded8113654
@ -116,6 +116,7 @@
|
||||
<command id="Browser:PrevTab" oncommand="gBrowser.tabContainer.advanceSelectedTab(-1, true);"/>
|
||||
<command id="Browser:ShowAllTabs" oncommand="allTabs.open();"/>
|
||||
<command id="Browser:ToggleTabView" oncommand="TabView.toggle();"/>
|
||||
<command id="Browser:FocusNextFrame" oncommand="focusNextFrame(event);"/>
|
||||
<command id="cmd_fullZoomReduce" oncommand="FullZoom.reduce()"/>
|
||||
<command id="cmd_fullZoomEnlarge" oncommand="FullZoom.enlarge()"/>
|
||||
<command id="cmd_fullZoomReset" oncommand="FullZoom.reset()"/>
|
||||
@ -304,6 +305,7 @@
|
||||
#ifndef XP_MACOSX
|
||||
<key id="showAllHistoryKb" key="&showAllHistoryCmd.commandkey;" command="Browser:ShowAllHistory" modifiers="accel,shift"/>
|
||||
<key keycode="VK_F5" command="Browser:ReloadSkipCache" modifiers="accel"/>
|
||||
<key keycode="VK_F6" command="Browser:FocusNextFrame"/>
|
||||
<key id="key_fullScreen" keycode="VK_F11" command="View:FullScreen"/>
|
||||
#else
|
||||
<key id="key_fullScreen" key="&fullScreenCmd.macCommandKey;" command="View:FullScreen" modifiers="accel,shift"/>
|
||||
|
@ -9019,3 +9019,10 @@ XPCOMUtils.defineLazyGetter(window, "gShowPageResizers", function () {
|
||||
#endif
|
||||
});
|
||||
|
||||
function focusNextFrame(event) {
|
||||
let fm = Cc["@mozilla.org/focus-manager;1"].getService(Ci.nsIFocusManager);
|
||||
let dir = event.shiftKey ? fm.MOVEFOCUS_BACKWARDDOC : fm.MOVEFOCUS_FORWARDDOC;
|
||||
let element = fm.moveFocus(window, null, dir, fm.FLAG_BYKEY);
|
||||
if (element.ownerDocument == document)
|
||||
focusAndSelectUrlBar();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user