Bug 644186 - Open a new window when shift-clicking the "Open a new tab" button. r=Dao

This commit is contained in:
Willian Gustavo Veiga 2014-02-11 13:21:58 -05:00
parent e50ff8e205
commit fd8a3c8c5f
2 changed files with 9 additions and 1 deletions

View File

@ -20,7 +20,7 @@
<command id="cmd_handleBackspace" oncommand="BrowserHandleBackspace();" />
<command id="cmd_handleShiftBackspace" oncommand="BrowserHandleShiftBackspace();" />
<command id="cmd_newNavigatorTab" oncommand="BrowserOpenTab();"/>
<command id="cmd_newNavigatorTab" oncommand="BrowserOpenNewTabOrWindow(event);"/>
<command id="Browser:OpenFile" oncommand="BrowserOpenFileWindow();"/>
<command id="Browser:SavePage" oncommand="saveDocument(window.content.document);"/>

View File

@ -7203,3 +7203,11 @@ let BrowserChromeTest = {
this._cb = cb;
}
};
function BrowserOpenNewTabOrWindow(event) {
if (event.shiftKey) {
OpenBrowserWindow();
} else {
BrowserOpenTab();
}
}