web page can override context-menus and other browser functions

VERIFIED DUPLICATE of bug 220088

Status

()

Core
Keyboard: Navigation
--
critical
VERIFIED DUPLICATE of bug 220088
14 years ago
14 years ago

People

(Reporter: Jeremy M. Dolan, Assigned: Aaron Leventhal)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

14 years ago
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;
(Reporter)

Comment 1

14 years ago
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
Last Resolved: 14 years ago
Resolution: --- → DUPLICATE
(Reporter)

Comment 2

14 years ago
and v
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.