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)
Tracking
()
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>
Comment 1•24 years ago
|
||
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
Assignee | ||
Comment 2•24 years ago
|
||
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.
Assignee | ||
Comment 3•24 years ago
|
||
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
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.
--
Comment 7•23 years ago
|
||
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
Updated•23 years ago
|
QA Contact: madhur → rakeshmishra
Updated•22 years ago
|
QA Contact: rakeshmishra → trix
Updated•6 years ago
|
Component: Event Handling → User events and focus handling
You need to log in
before you can comment on or make changes to this bug.
Description
•