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);"/>