Open Bug 330756 Opened 18 years ago Updated 3 years ago

dom.event.contextmenu.enabled false does not work

Categories

(Core :: DOM: Events, defect, P5)

x86
Windows 2000
defect

Tracking

()

People

(Reporter: Peter6, Unassigned)

References

Details

Attachments

(1 file)

Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9a1) Gecko/20060316 Firefox/1.6a1 ID:2006031613 [cairo]

repro:
1.set dom.event.contextmenu.enabled false
2.rightclick in testcase

result:
no firefox contextmenu available
regressed, don't know when
Attached file testcase
*** Bug 330755 has been marked as a duplicate of this bug. ***
So I see an alert, and then I see the context menu.  Are you seeing something different?
yep, just the alert, the contextmenu won't show
I see the same thing, using current trunk and 1.8 branch on windows.
1) set dom.event.contextmenu.enabled to false. 2) right click on the testcase
Result: alert, then no context menu.
this regressed before FF1.5 was released (just checked with an old 1.5 build/profile)
Did this regress with bug 167145?
Note that on Linux this worksforme, even if I change the testcase to cancel mousedown too.
(In reply to comment #7)
> Did this regress with bug 167145?
No, I just tried with Mozilla1.6, it doesn't even work with that build.
This does not seem to be a regression as it still occurs in Phoenix 0.1:
Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.2b) Gecko/20020923 Phoenix/0.1
Removing Keywords per previous Comment.
The following javascript code will prevent the context menu from appearing when the "options->content->javascript->advanced->Disable or replace context menus" is unselected (using FF3.6.8):

<SCRIPT LANGUAGE="JAVASCRIPT">
<!--
function click(e)
   {
   var msg = "No right click is allowed";
   if (document.all)
      {
      if (event.button == 2)
         {
         alert(msg);
         return false;
         }
      }
   if (document.layers)
      {
      if (e.which == 3)
         {
         alert(msg);
         return false;
         }
      }
   }
if (document.layers)
   {
   document.captureEvents(Event.MOUSEDOWN);
   }
document.onmousedown=click;
//-->
</script>

Expected behavior when "options->content->javascript->advanced->Disable or replace context menus" is unselected is to show the context menu in all cases.  Javascript should not be able to prevent the context menu from showing up when the user has requested it.
Component: Preferences → DOM: Events
Product: Firefox → Core

Bulk-downgrade of unassigned, 4 years untouched DOM/Storage bugs' priority.

If you have reason to believe this is wrong (especially for the severity), please write a comment and ni :jstutte.

Severity: normal → S4
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: