Symptoms

Assume that you define a textarea element that has a maxLength attribute defined to a value on a webpage. Then, you open the webpage in legacy quirks mode in Internet Explorer 11. When you try to retrieve the maxLength attribute by using the getAttribute method on the webpage, the result is null.

Resolution

Update information

To resolve this problem, install the most recent cumulative security update for Internet Explorer. To do this, go to Microsoft Update. Additionally, see the technical information about the most recent cumulative security update for Internet Explorer.

Note This update was first included in March cumulative security update for Internet Explorer (MS15-018).

Workaround

To work around this issue, you can set the webpage to use a later document mode.

More information

This issue occurs because that the maxLength attribute is not exposed to the document if the webpage uses Internet Explorer 5 document mode (quirks mode) or Internet Explorer 7 document mode. The following is an example of a webpage in which the issue occurs:

<html>
<head>
<meta content="IE=5" http-equiv="X-UA-Compatible" />
</head>
<body>
<textarea rows="4" cols="50" maxLength="200" onclick="javascript:alert ('maxLength is ' + this.getAttribute('maxLength'));"></textarea>
</body>
</html>

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

References

See the terminology that Microsoft uses to describe software updates.

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

What affected your experience?

Thank you for your feedback!

×