-
Notifications
You must be signed in to change notification settings - Fork 47k
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
fix onChange with placeholder on IE #5004
Conversation
btw: how to test on ie10?
I have to |
👍 |
At least some of this code would need to go in ChangeEventPlugin, because the event is already going to bubble by the time _handleChange is invoked in ReactDOMInput. _currentValue should also go within the ReactDOMInput-specific _wrapperState object; you shouldn't need to add anything to every ReactDOMComponent. I think it's hard/impossible to get the ReactDOMInput instance from ChangeEventPlugin though. We don't run our tests in browsers any more. It wasn't something we used often and it got lost in one of our change to extract common modules to https://github.com/facebook/fbjs. |
760d6ee
to
c35e4d7
Compare
ok, have moved _currentValue to _wrapperState and prevent false change from bubbling (fortunately input can not has any child). ChangeEventPlugin is already very complex, I think change in ReactDOMInput is easy and effective. |
#4051 should have fixed this. |
IE 10/11 will fire input event when input renders if input's placeholder contains Chinese words:
plain: http://jsfiddle.net/yiminghe/fm3rckaz/2/
react: https://jsfiddle.net/yiminghe/69z2wepo/17145/
and other situations: https://connect.microsoft.com/IE/feedback/details/885747/ie-11-fires-the-input-event-when-a-input-field-with-placeholder-is-focused