Unfortunately, the solution to this problem is quite straightforward.
If you're dealing with Internet Explorer 7, any white-space
value that is not pre
will trigger this issue.
For Internet Explorer 8, using anything other than pre-wrap
as the white-space
value will also cause problems.
As for Internet Explorer 9, I haven't had the chance to test it yet. However, if you encounter the same issue there, simply create a blank page with a <textarea>
, open it, press F12, and run
console.log(document.getElementsByTagName("TEXTAREA")[0].currentStyle.whiteSpace)
in the console ("Scripts" tab). Use the displayed value as the
white-space
property of the
<
textarea>
.
Update:
In my trial with Internet Explorer 11 across different emulation modes starting from Internet Explorer 7 mode, I observed that it behaves like Chrome in quirks mode. Only white-space: normal
and white-space: nowrap
seem to trigger the issue. It appears that they might have unintentionally backported some fixes to most emulation modes.