Closed Bug 250753 Opened 20 years ago Closed 17 years ago

Disable browser context menu when viewing Java (VNC) applets.

Categories

(Core Graveyard :: Java: OJI, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 378424

People

(Reporter: jasonb, Assigned: alfred.peng)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040702
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040702

(I'm not entirely sure if this is the right component, but will start the bug
off here.  I also couldn't find any obvious duplicates.)

When using a Java applet and right clicking, Mozilla still brings up the browser
context menu.  I can imagine some cases where this is not a problem - but when I
use VNC to control a remote desktop this is HIGHLY annoying because, in addition
to having the right-click be processed on the remote desktop, it's also
processed by Mozilla - and Mozilla's context menu takes priority.  I have to
click on "Select All" (since it doesn't actually do anything) to get Mozilla's
context menu to disappear before I can continue working with the remote
desktop's context menu.

Reproducible: Always
Steps to Reproduce:
1. VNC to a remote computer.
2. Right click on the desktop or an icon.


Actual Results:  
Get both the context menu for the remote desktop AND Mozilla's context menu. 
Mozilla's context menu sits on top of / interferes with the remote desktop
context menu and requires you to click on a menu entry before it will disappear
and you can continue working.

Expected Results:  
Should get just the context menu for the remote desktop.

I'm not sure how to actually address this problem.  It seems to me that, in most
cases, this is "as designed" because people might want to get to the Mozilla
context menu when looking at some Java applets.  But in the case of VNC it's
definitely a big problem.  If it's not as simple as disallowing the Mozilla
context menu in all cases when a Java applet "viewscreen" is clicked on - then
we'd have to look into "blacklists" or something based on some unique
identification of the type of Java applet that's being run.  (To which, for
instance, VNC and variants would be added.)
I believe OJI is a better component for this, but who knows...
Assignee: blackconnect → kyle.yuan
Component: Java-Implemented Plugins → Java: OJI
QA Contact: avm
Okay, I know what the problem is.  If I don't allow JavaScript to "Disable or
replace context menus" then I get the Mozilla context menu in addition to the
remove VNC desktop context menu.  If I DO allow JavaScript to disable context
menus, then Mozilla's context menu does not pop up.

I believe that this is an unwanted consequence of bug 86193 - so the actual
preference is user_pref("dom.event.contextmenu.enabled", true);

Adding Christopher to the CC list since he's the one who worked on that bug and
could have some good input to this specific problem.
Same on http://www.map24.com.

Enter some Address to search for an let Java Applet being loaded.
You will see a map which can be moved with right Mousebutton.

With setting dom.event.contextmenu.enabled = false, context menu will always be
shown when releasing right mouse button.
Witz dom.event.contextmenu.enabled = true, context menu will be shown when
releasing the mousebutton while mouse is _outside_ the java applet.

This is really annoying as I use this pageregularly.
This is all actually by design - but I'm now convinced that the approach needs
to be tweaked so that sites can be whitelisted (specific sites ARE allowed to
change / disable the context menu) so as to avoid this kind of situation.
I just now found this bug report.  It is the same as bug 260902 which I filed a
couple of months back.  The two should be combined.
Since your bug is targetted against Firefox, and this one is targetted against
Seamonkey, they should remain separate.  (Although work in one may well result
in work in the other.)

I've confirmed your bug though, since it's also legitimate for Firefox.
What vnc viewer are you using? I test with VNC 4.0, the applet is completely in
a new popup window, there is no way for mozilla to popup its menu. 
I don't even understand your question.  I'm not using any VNC viewer.  I'm using
Mozilla.

With Mozilla, I go to http://[url]:5800.  I don't get a "popup window" (that's
not how it works).  The remote desktop is embedded in the current Mozilla window...
Sorry, I meant "the version of VNC *server*".
Ah, okay.  I'm currently using TightVNC 1.3dev5 - but I've also tried this with
1.2.9.  However, VNC is just one example of this problem.  Although I can't
recall the specific cases, I have encountered other times when I've run embedded
Java apps that have the same problem.  When clicking on the portion of the
browser window that contains the app, both the app's context menu AND Mozilla's
will appear.  I still think that this makes sense, based on what I understand is
going on.  So, I'm confused why you *wouldn't* (currently) be seeing this...

You definitely don't have "Disable or replace context menus" checked under Prefs
-> Advanced -> Scripts & Plug-ins?
Follow the steps in comment 3.  I still get the context menu there, too.
I tried the url in comment 3, no matter how dom.event.contextmenu.enabled is
set, no browser context menu popup inside applet. Could you try again with jre 1.5?
> Could you try again with jre 1.5?

That's the version I'm using - both on my XP Profesional SP2 machine at home,
and on my 2000 Professional SP4 machine at work.  They both show the context
menu as described in this bug.  Since two other people have reported the same
thing here, I have the feeling that you're the one who's the exception. <grin>
What is it about your setup that is NOT producing the context menu?  In fact,
there isn't any reason I can think of for it not to appear so long as you don't
allow the site to override things...
Assignee: yuanyi21 → pete.zha
To further address comment 7 - I have since connected to a VNC 4 ("RealVNC")
server, and it doesn't have the context menu problem.  However, what VNC does is
spawn a completely new window (generated by Java, not Mozilla) rather than
existing in a browser tab/window, as does a connection to a TightVNC viewer.
Assignee: pete.zha → yuanyi21
QA Contact: pete.zha
Damn it.  I clicked on the "Reassign" radio box by mistake as I went to commit
my last comment.  Putting things back.
Assignee: yuanyi21 → pete.zha
mass reassign to Alfred
Assignee: zhayupeng → alfred.peng
This still happens in Firefox 2.0b1 and is still very annoying.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1b1) Gecko/20060710 Firefox/2.0b1

To reproduce:
1. Tools - Options - Content - JavaScript Advanced - untick "Disable or replace context menus"
2. Go to map24.com and load the java applet map oder connect to a vnc applet
3. right click(-and-drag) into the map or right click into the vnc applet.

If this is really intended (as written in comment #4), why doesn't the context menu appear over flash movies? (both are plugins...)

Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Status: REOPENED → RESOLVED
Closed: 17 years ago17 years ago
Resolution: --- → DUPLICATE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.