Closed
Bug 220088
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)
Tracking
()
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;
Reporter | ||
Comment 1•21 years ago
|
||
*** Bug 220087 has been marked as a duplicate of this bug. ***
Comment 2•21 years ago
|
||
*** This bug has been marked as a duplicate of 86193 ***
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
Updated•6 years ago
|
Component: Keyboard: Navigation → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•