From 97ea8ef89e16aa5eb3c1e957f0b279571889f44b Mon Sep 17 00:00:00 2001 From: "mozilla.mano@sent.com" Date: Tue, 8 Jan 2008 20:04:31 -0800 Subject: [PATCH] Bug 345031 - History>Home should be middle-clickable. patch by Michael Ventnor and Ehsan Akhgari , r=me, a=mconnor. --- browser/base/content/browser-menubar.inc | 3 ++- browser/base/content/browser.js | 5 +++-- browser/base/content/browser.xul | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/browser/base/content/browser-menubar.inc b/browser/base/content/browser-menubar.inc index 2f69b9ebf9e..1ef070af11c 100644 --- a/browser/base/content/browser-menubar.inc +++ b/browser/base/content/browser-menubar.inc @@ -356,7 +356,8 @@ diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index 6f904adf87b..0b36327c039 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -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(); diff --git a/browser/base/content/browser.xul b/browser/base/content/browser.xul index f0076dad32d..f50a32aacf4 100644 --- a/browser/base/content/browser.xul +++ b/browser/base/content/browser.xul @@ -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);"/>