зеркало из https://github.com/mozilla/gecko-dev.git
Bug 279687: allow middle clicks on Go button to open current URL in a new tab, and respect shift+(new tab action) in more places, r+ui-r=mconnor
This commit is contained in:
Родитель
ba270fe39d
Коммит
4c59f08333
|
@ -274,12 +274,12 @@
|
|||
flex="100">
|
||||
<searchbar id="searchbar" flex="1"/>
|
||||
</toolbaritem>
|
||||
|
||||
|
||||
<toolbaritem id="go-container" align="center" class="chromeclass-toolbar-additional">
|
||||
<toolbarbutton id="go-button"
|
||||
chromedir="&locale.dir;"
|
||||
label="&goButton.label;"
|
||||
oncommand="handleURLBarCommand(event);"
|
||||
onclick="if (event.button != 2) openUILink(gURLBar.value, event);"
|
||||
ondragover="nsDragAndDrop.dragOver(event, goButtonObserver);"
|
||||
ondragdrop="nsDragAndDrop.drop(event, goButtonObserver);"
|
||||
ondragexit="nsDragAndDrop.dragExit(event, goButtonObserver);"
|
||||
|
|
|
@ -225,6 +225,7 @@ function openUILinkIn( url, where, allowThirdPartyFixup )
|
|||
return;
|
||||
}
|
||||
var browser = w.document.getElementById("content");
|
||||
var loadInBackground = getBoolPref("browser.tabs.loadBookmarksInBackground", false);
|
||||
|
||||
switch (where) {
|
||||
case "current":
|
||||
|
@ -232,8 +233,9 @@ function openUILinkIn( url, where, allowThirdPartyFixup )
|
|||
w.content.focus();
|
||||
break;
|
||||
case "tabshifted":
|
||||
loadInBackground = !loadInBackground;
|
||||
// fall through
|
||||
case "tab":
|
||||
var loadInBackground = getBoolPref("browser.tabs.loadBookmarksInBackground", false);
|
||||
browser.loadOneTab(url, null, null, null, loadInBackground,
|
||||
allowThirdPartyFixup || false);
|
||||
break;
|
||||
|
|
Загрузка…
Ссылка в новой задаче