Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Textarea placeholder isn't shown in IE 11 being rendered using React

I have following HTML:

<textarea placeholder="Usual textarea placeholder"></textarea>
<div id="react-container"></div>

... and following JS:

ReactDOM.render(
    <textarea placeholder="React textarea placeholder"/>,
    document.getElementById('react-container')
);

So, I am trying to show the same things using React and using usual HTML.

However, in IE 11 at least, textarea rendered using React behaves like this:

enter image description here

So, textarea placeholder isn't displayed when page loaded. What's going on here? Both these textareas looks exactly the same in DOM.

Here is a link to the fiddle: https://jsfiddle.net/bbs8odf9/2/

like image 555
Nikolai Mavrenkov Avatar asked Apr 27 '16 14:04

Nikolai Mavrenkov


1 Answers

So it appears the PR that will fix this in React has just been reviewed and accepted: https://github.com/facebook/react/pull/6406

I would expect the fix to be released soonish.

like image 169
arendjr Avatar answered Sep 29 '22 08:09

arendjr