ie11 textarea wrap white-space

It seems that word wrapping no longer works for textarea elements in IE 11. In IE 10 and earlier,FF, Safari, and Chrome word wrapping works as expected.

The problem is not very difficult to reproduce: Create an HTML page with a textarea that has a fixed width and containing a sentence that is longer than the textarea width. Open the HTML file using IE 11 and you will see that the next is not wrapping.

The cause of the problem is that Internet Explorer 11 makes textarea elements inherit whatever white-space property is applied to the direct parent.

The resolution is to apply white-space: pre-wrap to the textarea.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s