BUG: Keystroke Expands Width of a Relative Positioned TEXTAREA Element (276400)



The information in this article applies to:

  • Microsoft Internet Explorer (Programming) 5.5

This article was previously published under Q276400

SYMPTOMS

In Internet Explorer 5.5, when you type inside a TEXTAREA element that is within a DIV element, you may notice on your first keystroke that the width increases by the amount of the containing DIV's padding-left attribute.

RESOLUTION

To work around this bug, set the style of the TEXTAREA element on the document to the absolute position.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create an HTML file, and paste the following code:
    <HTML>
      <HEAD>
        <TITLE>Document Title</TITLE>
      </HEAD>
      <BODY>
        <DIV STYLE="padding-left: 50px">
    
          <P>Type inside the TEXTAREA element. Notice that on your first keystroke, 
    the width increases by the amount of the containing DIV's padding-left attribute.</P>
    
          <TEXTAREA STYLE="position: relative; width: 70%"></TEXTAREA>
    
        </DIV>
      </BODY>
    </HTML>
    					
  2. In Internet Explorer 5.5, open the file, and type inside the TEXTAREA element. The TEXTAREA expands to 50 pixels.

REFERENCES

For more information about developing Web-based solutions for Microsoft Internet Explorer, visit the following Microsoft Web sites:

Modification Type:MajorLast Reviewed:5/11/2006
Keywords:kbBug kbDHTML kbpending KB276400