зеркало из https://github.com/mozilla/pjs.git
Bug 345031 - History>Home should be middle-clickable. patch by Michael Ventnor <ventnor.bugzilla@yahoo.com.au> and Ehsan Akhgari <ehsan.akhgari@gmail.com>, r=me, a=mconnor.
This commit is contained in:
Родитель
614fa0106a
Коммит
9e890e0198
|
@ -356,7 +356,8 @@
|
||||||
</menuitem>
|
</menuitem>
|
||||||
|
|
||||||
<menuitem label="&historyHomeCmd.label;"
|
<menuitem label="&historyHomeCmd.label;"
|
||||||
command="Browser:Home"
|
oncommand="BrowserGoHome(event);"
|
||||||
|
onclick="checkForMiddleClick(this, event);"
|
||||||
key="goHome"/>
|
key="goHome"/>
|
||||||
<menuseparator id="startHistorySeparator" builder="start"/>
|
<menuseparator id="startHistorySeparator" builder="start"/>
|
||||||
<menuseparator id="endHistorySeparator" builder="end"/>
|
<menuseparator id="endHistorySeparator" builder="end"/>
|
||||||
|
|
|
@ -1445,9 +1445,10 @@ function BrowserHome()
|
||||||
loadOneOrMoreURIs(homePage);
|
loadOneOrMoreURIs(homePage);
|
||||||
}
|
}
|
||||||
|
|
||||||
function BrowserHomeClick(aEvent)
|
function BrowserGoHome(aEvent)
|
||||||
{
|
{
|
||||||
if (aEvent.button == 2) // right-click: do nothing
|
if (aEvent && "button" in aEvent &&
|
||||||
|
aEvent.button == 2) // right-click: do nothing
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var homePage = gHomeButton.getHomePage();
|
var homePage = gHomeButton.getHomePage();
|
||||||
|
|
|
@ -247,7 +247,7 @@
|
||||||
ondragover="nsDragAndDrop.dragOver(event, homeButtonObserver);"
|
ondragover="nsDragAndDrop.dragOver(event, homeButtonObserver);"
|
||||||
ondragdrop="nsDragAndDrop.drop(event, homeButtonObserver);"
|
ondragdrop="nsDragAndDrop.drop(event, homeButtonObserver);"
|
||||||
ondragexit="nsDragAndDrop.dragExit(event, homeButtonObserver);"
|
ondragexit="nsDragAndDrop.dragExit(event, homeButtonObserver);"
|
||||||
onclick="BrowserHomeClick(event);"/>
|
onclick="BrowserGoHome(event);"/>
|
||||||
|
|
||||||
<toolbaritem id="urlbar-container" align="center" flex="400" persist="width"
|
<toolbaritem id="urlbar-container" align="center" flex="400" persist="width"
|
||||||
title="&locationItem.title;" class="chromeclass-location">
|
title="&locationItem.title;" class="chromeclass-location">
|
||||||
|
|
Загрузка…
Ссылка в новой задаче