From 32c649e053a6bdbf071be31cfc767e380e0c7aba Mon Sep 17 00:00:00 2001 From: "kyle.yuan%sun.com" Date: Tue, 7 Sep 2004 01:36:08 +0000 Subject: [PATCH] Bug 241731 bookmarks sidebar creates empty contextmenu when no items are selected r=mconnor, a=asa git-svn-id: svn://10.0.0.236/branches/AVIARY_1_0_20040515_BRANCH@161838 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/browser/components/bookmarks/content/bookmarks.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mozilla/browser/components/bookmarks/content/bookmarks.js b/mozilla/browser/components/bookmarks/content/bookmarks.js index 3d958b567f6..e743c8a090b 100644 --- a/mozilla/browser/components/bookmarks/content/bookmarks.js +++ b/mozilla/browser/components/bookmarks/content/bookmarks.js @@ -190,6 +190,11 @@ var BookmarksCommand = { // selection. createContextMenu: function (aEvent, aSelection, aDS) { + if (aSelection == undefined) { + aEvent.preventDefault(); + return; + } + var popup = aEvent.target; // clear out the old context menu contents (if any) while (popup.hasChildNodes())