Bug 326737

Respect shift key state when opening link in new tab from the context menu
r=jag sr=neil
This commit is contained in:
cst%andrew.cmu.edu 2006-07-29 05:44:40 +00:00
parent 61f8de7625
commit f9ae1c323e
2 changed files with 6 additions and 6 deletions

View File

@ -78,7 +78,7 @@
<menuitem id="context-openlinkintab"
label="&openLinkCmdInTab.label;"
accesskey="&openLinkCmdInTab.accesskey;"
oncommand="gContextMenu.openLinkInTab();"/>
oncommand="gContextMenu.openLinkInTab(event.shiftKey);"/>
<menuseparator id="context-sep-open"/>
<menuitem id="context-bookmarklink"
label="&bookmarkLinkCmd.label;"
@ -201,7 +201,7 @@
oncommand="gContextMenu.openFrame();"/>
<menuitem label="&openFrameCmdInTab.label;"
accesskey="&openFrameCmdInTab.accesskey;"
oncommand="gContextMenu.openFrameInTab();"/>
oncommand="gContextMenu.openFrameInTab(event.shiftKey);"/>
<menuseparator/>
<menuitem id="context-reload-frame"
label="&reloadFrameCmd.label;"

View File

@ -521,14 +521,14 @@ nsContextMenu.prototype = {
openNewWindowWith( this.linkURL(), true );
},
// Open linked-to URL in a new tab.
openLinkInTab : function () {
openLinkInTab : function ( reverseBackgroundPref ) {
// Determine linked-to URL.
openNewTabWith( this.linkURL(), true, false );
openNewTabWith( this.linkURL(), true, reverseBackgroundPref );
},
// Open frame in a new tab.
openFrameInTab : function () {
openFrameInTab : function ( reverseBackgroundPref ) {
// Determine linked-to URL.
openNewTabWith( this.target.ownerDocument.location.href );
openNewTabWith( this.target.ownerDocument.location.href, true, reverseBackgroundPref );
},
// Reload clicked-in frame.
reloadFrame : function () {