-
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
Setting and removing focus in an empty input field with placeholder triggers change in IE #3377
Comments
@spicyj Sounds like a browser quark that we should normalize against, right? Is there anything other than value that we would need to check? |
Yeah, this seems odd. Probably on the challenging side for a first bug, but it would be good to figure out why this is happening and how we can prevent it, while still making it possible to type the placeholder text in directly as @captray says. |
#2185, not really related but I imagine both could be solved by a similar fix. |
Also goes for IE10. |
See http://jsfiddle.net/69z2wepo/3887/ for example code.
When setting and removing focus from an empty
<input />
field with someplaceholder
text, theonChange
event is triggered for IE 11 (I have not tested older versions). It does not trigger for other browsers.My current work-around is to test the
value
that was last passed to the input with what is returned byevent.target.value
, and only act if they are different, but it would be nice if React would not send the change-event in the first place.The text was updated successfully, but these errors were encountered: