Closed Bug 220087 Opened 21 years ago Closed 21 years ago

web page can override context-menus and other browser functions

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

x86
Linux
defect
Not set
critical

Tracking

()

VERIFIED DUPLICATE of bug 220088

People

(Reporter: jmd, Assigned: aaronlev)

References

()

Details

Sample book pages on Amazon.com have JS which tries to nullify right-clicks, I
suppose to make life difficult for people who want to save an image.

Context menus are a application function and a web page should not be allowed to
override them. If it is a requirement of JS to allow right-clicks to be tied to
other actions, ctrl+click needs to be implemented to always perform the default
action.

The offending JS:

function noRightClick(e) {
if (document.layers || document.getElementById && !document.all) {
if (e.which == 2 || e.which == 3) {
document.captureEvents(Event.MOUSEDOWN);
return false;
}
} else if (document.all && !document.getElementById) {
if (event.button == 2)
return false;
}
}
function noContextMenu () {
return false;
}
document.onmousedown = noRightClick;
document.oncontextmenu = noContextMenu;
Either Bugzilla needs UID tracking on bug submitals, or Mozilla needs vastly
better caching options. POSTDATA my arse. Duping this to the second since it has
a cooler bug id.

*** This bug has been marked as a duplicate of 220088 ***
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
and v
Status: RESOLVED → VERIFIED
Component: Keyboard: Navigation → User events and focus handling
You need to log in before you can comment on or make changes to this bug.