Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6939179

javascript form input field doesn't get focus upon applet starts

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Duplicate
    • Affects Version/s: 6u18
    • Fix Version/s: None
    • Component/s: deploy
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_xp

      Description

      FULL PRODUCT VERSION :
      java version "1.6.0_18"
      Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
      Java HotSpot(TM) Client VM (build 16.0-b13, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      jdk1.6.0_18 / XP

      A DESCRIPTION OF THE PROBLEM :
      This minimal html/applet reproduces a bug that was introduced some time after j2sdk1.4.2_17:
      <b>document.MYFORM.MYINPUT.focus() fails simply because an applet (<i>any applet</i>) exists.</b>
      If the applet is removed, it works.
      If I build X.java with j2sdk1.4.2_17, it works.
      The problem happens when I build it with jdk1.6.0_18.

      In IE, the focus is simply "elsewhere".
      FireFox actually places the cursor in the field, but entering keys just results in beeps
      (one must click outside the field and then in it again).

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      simply display http://OmnipotenceSoftware.com/javabug.htm

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      i expect to be able to type in the form input !
      see desc
      ACTUAL -
      i cannot type in the form input !
      see desc

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      none - just beeps.
      see desc

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.applet.Applet;

      public class X extends Applet
      {
      public synchronized void init()
      {
      addFocusListener(this);
      }
      public synchronized void start()
      {
      }
      public synchronized void stop()
      {
      }
      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      If I build X.java with j2sdk1.4.2_17, it works fine.

      Release Regression From : 1.4.2_17
      The above release value was the last known release where this
      bug was not reproducible. Since then there has been a regression.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ccheung Calvin Cheung
                Reporter:
                ndcosta Nelson Dcosta (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: