Closed Bug 73981 Opened 24 years ago Closed 23 years ago

Can't stop context menu from onmousedown like in 4x

Categories

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

x86
Windows NT
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 72084
mozilla1.0

People

(Reporter: nshankar, Assigned: joki)

References

Details

Mozilla .8.1 on windows NT 4.0 Here is the problem. when you run javascript on a mouse right click event and display alert, only the alert should be displayed. Whereas, the menu (that is normally displayed on right click) and the alert are displayed. It appears to be cosmetic. But if you actually select back the program locks up (on some combination of navigation.sometimes locks on a back followed by forward). you need to press right click slightly longer to easily replicate this problem. Please see attached code. Thanks Sankar <HTML> <HEAD> <script language="javascript"> function click(e) { if (navigator.appName == 'Netscape' && e.which == 3) { alert("Netscape") return false; } return true; } document.onmousedown=click </script> </HEAD> <BODY> Do not right click!!! </BODY></HTML>
Browser, not engine ---> Event Handling. Related to bug 71705, "Right-click triggers onclick handler"
Assignee: rogerl → joki
Status: UNCONFIRMED → NEW
Component: Javascript Engine → Event Handling
Ever confirmed: true
QA Contact: pschwartau → gerardok
Summary: alert not function as expected with mouse event → alert not functioning as expected with mouse event
The basic issue here is that the UI guys decided to change the context menu to appear as a result of clicks now as opposed to mousedowns. So the code you have needs to prevent the click to stop the context menu, not the mousedown. I have a dupe of this around somewhere, I'll take a look.
Can't find the dupe. Setting milestone to moz1.0 and attaching to 4x event compatibility tracking bug.
Blocks: 77563
Status: NEW → ASSIGNED
Summary: alert not functioning as expected with mouse event → Can't stop context menu from onmousedown like in 4x
Target Milestone: --- → mozilla1.0
*** Bug 83115 has been marked as a duplicate of this bug. ***
QA contact updated
QA Contact: gerardok → madhur
I think this bug is invalid, to quote "vladimire@netscape.com" in bug 83115: -- For Netscape 6 use e.preventDefault() method to cancel the default action like the popup menu. --
Duplicate of "There is no way to disable the context menu upon right-click (oncontextmenu?)" *** This bug has been marked as a duplicate of 72084 ***
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
QA Contact: madhur → rakeshmishra
QA Contact: rakeshmishra → trix
Component: Event Handling → User events and focus handling
You need to log in before you can comment on or make changes to this bug.