Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
arendjr opened this issue May 9, 2016 · 18 comments

Comments

Projects
None yet
@arendjr
Copy link

commented May 9, 2016

Nikolai Mavrenkov already created a good description of the problem on Stack Overflow: http://stackoverflow.com/questions/36893449/textarea-placeholder-isnt-shown-in-ie-11-being-rendered-using-react

I just can confirm it breaks in IE11, but works in IE10 (and other browsers) with React v15.0.2.

@syranide

This comment has been minimized.

Copy link
Contributor

commented May 9, 2016

Confirmed... and really weird. I'm trying to reproduce it outside of React and I can't. So I'm not really sure what could be causing this.

@jimfb

This comment has been minimized.

Copy link
Contributor

commented May 9, 2016

Yet another bug which is automatically fixed by #6406

Demo without fix: https://jsfiddle.net/6tefu8g7/
Demo with fix: http://jsfiddle.net/m2ke4chf/

Can we PLEASE get that PR reviewed/merged. cc @facebook/react-core

@jimfb

This comment has been minimized.

Copy link
Contributor

commented Jun 8, 2016

Fixed by #6406.

@jimfb jimfb closed this Jun 8, 2016

@AnderssonChristian

This comment has been minimized.

Copy link

commented Jun 14, 2016

@jimfb I have a similar issue where the textarea would treat the initial value as the placeholder text. Demo here (test in IE11). I'm I correct in guessing this is directly related to the issue above, or is this another issue?

@syranide

This comment has been minimized.

Copy link
Contributor

commented Jun 14, 2016

@AnderssonChristian value={this.state.placeholderValue}

@AnderssonChristian

This comment has been minimized.

Copy link

commented Jun 14, 2016

@syranide pardon? :)

@syranide

This comment has been minimized.

Copy link
Contributor

commented Jun 14, 2016

@AnderssonChristian Brain shortcircuit, I thought you were setting the value to the placerholder text. Yeah I believe the error you're seeing is related to the error mentioned here and fixed.

@toonvanacker

This comment has been minimized.

Copy link

commented Aug 26, 2016

I'm seeing this bug again in React 15.3.0 (and also in 15.3.1)

Here's a small fiddle displaying the issue: https://jsfiddle.net/94g0kbhp/2/
How it looks in Chrome on OS X: chrome_osx
How it looks in IE11 on Windows 10: ie11_windows
IE11 version: 11.0.10240.16384

@AnderssonChristian

This comment has been minimized.

Copy link

commented Aug 29, 2016

@toonvanacker it worked fine for me in IE11.0.9600.18097

@manpreetssethi

This comment has been minimized.

Copy link

commented Oct 12, 2016

I'm seeing this again as well, +1 @toonvanacker

@ivank

This comment has been minimized.

Copy link

commented Oct 19, 2016

Yup i think this issue needs to be reopened @jimfb as you can easily reproduce it on the IE11 windows 10. Maybe add a test for it or something? Its the only thing still keeping me on 0.14 ...

@aweary

This comment has been minimized.

Copy link
Member

commented Oct 19, 2016

I was able to reproduce this using the latest release, https://jsfiddle.net/pfe7yq65/.

I'll reopen this since it's still an issue 👍

@aweary aweary reopened this Oct 19, 2016

@aweary

This comment has been minimized.

Copy link
Member

commented Oct 19, 2016

I was able to reproduce the issue outside of React, see https://jsfiddle.net/vovuant7/

var root = document.getElementById('root');
var textarea = document.createElement('textarea');
textarea.setAttribute('placeholder', 'Testing 1, 2, 3');
textarea.textContent = '';
root.appendChild(textarea)

The issue is that we are calling setTextContent on the node because the tree.text is '' when it should be null.

Setting textContent on a <textarea/> will overwrite the placeholder until it is focused/blurred, after which it will restore the placeholder text. This is not the case in other browsers I've tested.

I'll look into this more.

@Lkroner

This comment has been minimized.

Copy link

commented Dec 10, 2016

It looks like this may still be an issue rearing it's ugly head again. We are using React 15.4.1 and are seeing this behavior in ie11.

@gaearon

This comment has been minimized.

Copy link
Member

commented Jan 6, 2017

@Lkroner The bug was fixed in master, not in 15.4.1.

This should now be fixed in 15.4.2.
Please verify.

@gaearon

This comment has been minimized.

Copy link
Member

commented Jan 6, 2017

Or maybe not given comments in #8546. I’m confused, delegating to @aweary.

@curwen

This comment has been minimized.

Copy link

commented Oct 10, 2017

Has there been a regression in 16.0.0? I'm getting this issue in IE11 Windows 10.

@gaearon

This comment has been minimized.

Copy link
Member

commented Oct 10, 2017

Please file a new issue with details. Old issues have a lot of outdated info and are hard to track.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.