FIX: KeyStrokes in a Dialog Box are Preprocessed by IE

ID: Q191931


The information in this article applies to:
  • Microsoft Win32 Virtual Machine
  • Microsoft Internet Explorer for Windows NT 4.0
  • Microsoft Internet Explorer for Windows 95


SYMPTOMS

If an applet launches a dialog box with a Textfield, and you enter some characters in it and delete them using the BACKSPACE key, you will notice that it causes the underlying Internet Explorer 4.0 page to go back one page or shutdown.


CAUSE

Internet Explorer 4.0 captures the keystroke and interprets them as GO BACK; that is, pressing the BACK button in the page.


RESOLUTION

To fix the problem, use Microsoft Internet Explorer 4.01, which you can download from

http://www.microsoft.com/ie/.


STATUS

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem has been fixed in the Microsoft Internet Explorer 4.01.


MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a new Java Applet (TestKey.java) as follows:


  2. 
          import java.applet.*;
          import java.awt.*;
    
          public class TestKey extends Applet
          {
             public void start()
             {
                Component c = this;
                while(!(c instanceof Frame))
                   c = c.getParent();
                Dialog d = new Dialog((Frame)c, "hi", false);
                d.setBounds(200,200,200,200);
                d.setLayout(null);
    
                TextField t = new TextField();
                t.setBounds(50,50,100,30);
                d.add(t);
                d.show();
             }
          } 
  3. Create an HTML file (TestKey.html) for the above applet:


  4. 
          <HTML>
          <TITLE>IE 4.0 BackSpace Problem</TITLE>
          <BODY>
          <H1>Type characters with focus in the Dialog's Text field
              and delete them using BackSpace Key</H1>
          <hr>
          <applet code="TestKey.class" width=400 height=475>
          </applet>
          <hr>
          </BODY>
          </HTML> 
  5. Compile the above Applet:


  6. 
          JVC TestKey.java 
  7. Load the Web page (TestKey.html).


In Internet Explorer 4.0 you will notice that while trying to delete characters in the TextField, Internet Explorer either scrolls back one page, just as if you had pressed the Back button or it shuts down.

The problem doesn't occur in Internet Explorer 4.01.

Additional query words: keystroke backspace delete

Keywords :
Version : WINDOWS:
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: August 27, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.