Open Bug 238008 Opened 17 years ago Updated 5 years ago

Disabling contextMenu should also not fire onMouseDown Events


(Core :: DOM: Events, defect)

Windows XP
Not set





(Reporter: traumwandler, Unassigned)




User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.7b) Gecko/20040316 MultiZilla/
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.7b) Gecko/20040316 MultiZilla/

If you use an customised ContextMenu (like in the example) you listen to the
onmousedown Event with an Key Check. There should be a possibility either to
check if you cant hide the browser internal contextmenu or the event should not
even get fired (what i prefer) else it would look like the example.

This is an major bug for me because an release with this feature in this way
would maybe really hurt a bigger project of mine.

Reproducible: Always
Steps to Reproduce:
> else it would look like the example.

And what is wrong with the example?  This bug needs clear steps to reproduce. 
You think we have that section in there just for the fun of it?  ;)

This has nothing to do with the JS engine in any case.
Assignee: general → general
Component: JavaScript Engine → Browser-General
QA Contact: pschwartau → general
Aehmm disable in 1.7b your contextmenu and see the difference by clicking right
your mouse (thought this was clear, my mistake, the page is an example page for
customizing the contextmenu where all steps are defined. No i don't think this
section is for fun). You should see two contextMenus.

This was for me an JavaScript Bug because its the JavaScript Engine that allows
to hide contextMenu but i may be wrong, in fact i can only hard differ between
your Components. DOM Events would maybe fit better. 
Argh damnit, i allready forgot to push the steps:

To reproduce:
1.) Deactivate contextMenublocking
1.) Go to
2.) Push right Mouse Button.

What Mozilla does:
He shows both contextMenus because the onmousedown event was fired.

What Mozilla should do:
Eighter provide the possibility to check if the BrowsercontextMenu gets drawn,
or simple don't fire the onmousedown event on rightclick.
Are you saying that you don't want two menus to show up? The one coded by the
web page developer and the browser menu that was supposed to be blocked?

In this case I don't think you are right. The context menu coded in the page
should appear because that's the functionality of that page (if you inactivate
that one you will get a lot of bugs about pages that don't work corectly), and
the browser context menu should appear because the user chose to.

So I think this bug is invalid.
I want to say exactly that. Those options doesn't make sense if two menu's
appear. But okay. Then take the different way, there has to be a possibility to
check if the context menu will appear or not. Something like: Okay i want to
block rightclick, is it possible ? ... In this way, the developer has the
possibility to make the best solution. 
Product: Browser → Seamonkey
I can see something similar. I have seen a page where they hooked
document.onmousedown (and -up and also window.onmousedown and -up) just to show
a window that says the context menu is disabled on this page. That works in IE -
displays that dialog once. In firefox 1.0, it shows that dialog 4 times AND also
shows the context menu once after the second dismissed dialog. Not allowing the
page to disable the context menu in the javascript preferences makes no difference.
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Ok, what is the problem here?
In firefox 1.5b1 I see:
1 menu (from html) with 'allow sites to block context menu'
2 menus with this option disabled. Both menus easily usable, because they don't

I don't see any onmousedown hook in the source of the page. There is only
oncontextmenu and onmouseup.

Changing component, hopefully to something better.
Component: General → DOM: Events
Product: Mozilla Application Suite → Core
Assignee: general → nobody
QA Contact: general → events
similar error on my website . But now it is fixed.
You need to log in before you can comment on or make changes to this bug.