最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Textarea placeholder isn't shown in IE 11 being rendered using React - Stack Overflow

programmeradmin2浏览0评论

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:

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: /

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:

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/bbs8odf9/2/

Share Improve this question asked Apr 27, 2016 at 14:52 Nikolai MavrenkovNikolai Mavrenkov 1,92319 silver badges22 bronze badges 3
  • Have you created a bug for this? I'm running into the same issue right now. Can confirm it breaks in IE11, but works in IE10 (and other browsers) with React v15.0.2. – arendjr Commented May 9, 2016 at 9:59
  • Update: I didn't see a report for this among the issues for React, so I created it: github./facebook/react/issues/6731 – arendjr Commented May 9, 2016 at 10:04
  • @arendjr No, I didn't create a bug for it. I thought I will have a time to investigate this bug closely, but I didn't :( – Nikolai Mavrenkov Commented May 10, 2016 at 8:17
Add a ment  | 

1 Answer 1

Reset to default 4

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

I would expect the fix to be released soonish.

发布评论

评论列表(0)

  1. 暂无评论