C
Charlie
I want to detect and act on right button clicks in Firefox. The problem
was I kept getting the context menu pop up on right button clicks, even
when I called event.preventDefault(). I had assumed that this would
prevent the context menu which seems to be the default action. Why does
this not prevent the context menu from popping up?
Someone mentioned using the "contextmenu" event which I had assumed was
IE-only. I could not find it in the Mozilla documentation but it seems
to work in Firefox. When I used event.preventDefault() in the
conextmenu event handler it took care of the problem.
One other strange thing. The mousedown event from a right mouse click
has button=2 as expected but the corresponding mouseup event has
button=0. Why is that?
--Charlie Crowley
was I kept getting the context menu pop up on right button clicks, even
when I called event.preventDefault(). I had assumed that this would
prevent the context menu which seems to be the default action. Why does
this not prevent the context menu from popping up?
Someone mentioned using the "contextmenu" event which I had assumed was
IE-only. I could not find it in the Mozilla documentation but it seems
to work in Firefox. When I used event.preventDefault() in the
conextmenu event handler it took care of the problem.
One other strange thing. The mousedown event from a right mouse click
has button=2 as expected but the corresponding mouseup event has
button=0. Why is that?
--Charlie Crowley