JDK-4670697 : Signed applet gains no focus after Plug-in's security warning dialog is closed
  • Type: Bug
  • Component: deploy
  • Sub-Component: plugin
  • Affected Version: 1.4.0,1.4.1
  • Priority: P4
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: solaris,solaris_8
  • CPU: sparc
  • Submitted: 2002-04-18
  • Updated: 2005-10-26
  • Resolved: 2005-10-26
Related Reports
Relates :  
Description
This bug at least happens on Solaris (CDE) and Linux (KDE) with Java 1.4.0 and various Netscape 6 browsers.  It does not happen on Windows, however.

Start the attached FocusTest.html (make sure to change the codebase to the also attached FocusTest.jar).  It uses Java Plug-in 1.4 to start the (signed) FocusTest applet.  Prior to running the applet, the Plug-in opens a security warning dialog, which you have to exit via "Grant this session" or "Grant always".  After this dialog has been closed, the applet gains no keyboard focus (you cannot type anything into the applet's JTextArea).  If you one exit the security dialog via "Grant always" the dialog will not open on subsequent starts of FocusTest, and the applet's JTextArea will then work fine (i.e., it has the focus right after start, shows a caret, and accepts keyboard input).

Note that the problem does not occur if you use a plain AWT Applet (with a TextArea) component instead of a Swing JApplet (with a JTextArea).

The situation where I discovered the bug was with the Sun ONE Webtop's Productivity Applet (aka jclient) that is a singed applet that somewhat behaves like a JTextArea---it is a custom-drawn JComponent that wants to gain focus and accepts user input via keyboard/mouse.  It does not operate properly after the Plug-in's security dialog was up.

Comments
EVALUATION No update to this bug for the past year. Closing.
26-10-2005

EVALUATION ###@###.### 2002-07-31 I tested it using JRE 1.4.1-b18 build (Hopper), it works fine in Solaris Platfrom. I think this is a AWT bug and it already been fixed. Dennis Gu Submitter, please retest this bug using Java 1.4.1-b18. Let me know if you need a pointer. We are not able to reproduce. ###@###.### 2002-07-31 Tested it with Java 1.4.1-b19, and problem is still there. I am able to reproduce it with Netscape 6.2.1 on Solaris 2.7 (but only directly via CDE, not with ReflectionX remotely from a Win-Box). Also, I always type in the URL of the FocusTest.html page in the browser's URL edit field and hit return---maybe it makes a difference whether that page is reached by keyboard or mouse? With 1.4.1-b19, the certificate dialog that pops up can also be operated with the keyboard. If you operate it with the keyboard and the mouse is outside the dialog when it is closed, then the FocusTest's text edit gets the focus, otherwise not (i.e., when the mouse is within the dialog when it is closed). ###@###.### 2002-08-13 attached test case does not seem to be signed. I am running it with JRE 1.6.0 Applet loads and runs with initial focus in the text area. Need signed test case to reproduce the problem. ###@###.### 2005-06-07 21:27:28 GMT
07-06-2005