Closed Bug 376519 Opened 14 years ago Closed 14 years ago

Empty href js exception in this case when right-clicking

Categories

(Firefox :: Menus, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 3 alpha7

People

(Reporter: martijn.martijn, Assigned: florian)

Details

(Keywords: testcase)

Attachments

(2 files)

Attached file testcase
See testcase, with the testcase you get with right-clicking a js exception in the error console, and you see all possible options in the context menu:
Error: uncaught exception: Empty href

The error is here:
http://lxr.mozilla.org/seamonkey/source/browser/base/content/nsContextMenu.js#941
It doesn't seem logical that Firefox throws here, does it?
Attached patch patch v1Splinter Review
onLink should not be true in nsContextMenu when we are on an area tag without href value.

I assume that line was a copy/paste mistake in bug 266932:
(parent instanceof HTMLAnchorElement && elem.href)
Assignee: nobody → f.qu
Status: NEW → ASSIGNED
Attachment #271877 - Flags: review?(mano)
OS: Windows XP → All
Hardware: PC → All
Version: unspecified → Trunk
Keywords: checkin-needed
Checking in browser/base/content/nsContextMenu.js;
/cvsroot/mozilla/browser/base/content/nsContextMenu.js,v  <--  nsContextMenu.js
new revision: 1.17; previous revision: 1.16
done
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 3 M7
Flags: in-litmus?
Litmus Triage: marcia will handle test case.
https://litmus.mozilla.org/show_test.cgi?id=5884 added to Litmus.
Flags: in-litmus? → in-litmus+
You need to log in before you can comment on or make changes to this bug.