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:
mozilla.mano@sent.com 2008-01-08 20:04:31 -08:00
parent 479fe251b6
commit 97ea8ef89e
3 changed files with 6 additions and 4 deletions

View File

@ -356,7 +356,8 @@
</menuitem>
<menuitem label="&historyHomeCmd.label;"
command="Browser:Home"
oncommand="BrowserGoHome(event);"
onclick="checkForMiddleClick(this, event);"
key="goHome"/>
<menuseparator id="startHistorySeparator" builder="start"/>
<menuseparator id="endHistorySeparator" builder="end"/>

View File

@ -1445,9 +1445,10 @@ function BrowserHome()
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;
var homePage = gHomeButton.getHomePage();

View File

@ -247,7 +247,7 @@
ondragover="nsDragAndDrop.dragOver(event, homeButtonObserver);"
ondragdrop="nsDragAndDrop.drop(event, homeButtonObserver);"
ondragexit="nsDragAndDrop.dragExit(event, homeButtonObserver);"
onclick="BrowserHomeClick(event);"/>
onclick="BrowserGoHome(event);"/>
<toolbaritem id="urlbar-container" align="center" flex="400" persist="width"
title="&locationItem.title;" class="chromeclass-location">