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-09 04:04:31 +00:00
Родитель 614fa0106a
Коммит 9e890e0198
3 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -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">