-
Notifications
You must be signed in to change notification settings - Fork 47.6k
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
Don't add top-level events for uncontrolled inputs #1968
Conversation
Fixes facebook#1964. Test Plan: jest. Also verified that the ballmer-peak example still works and works when changed to use a textarea or select, but that if the input is changed to an uncontrolled component with no onChange, that Chrome doesn't list the event handlers bound in the Elements > Event Listeners panel.
This certainly makes the code more complex, not sure if it's worth it. (Refactoring ReactDOMSelect to not always read in handleChange probably seems good regardless though…) |
(Kind of unrelated) Personally (and perhaps I'm alone in this) I would like for us to have explicit paths for all the different "unique" input types, rather than the weird mess that it is right now. Also, what on earth is going on in
Why does that call the |
Not sure what you mean, that call is in |
@spicyj That was just unrelated thoughts about the implementation of Anyway, for posterity, I'm guessing similar action should be taken to avoid |
This complicates the code a bit and I haven't heard that this actually helps, so closing. |
Fixes #1964.
Test Plan: jest. Also verified that the ballmer-peak example still works and works when changed to use a textarea or select, but that if the input is changed to an uncontrolled component with no onChange, that Chrome doesn't list the event handlers bound in the Elements > Event Listeners panel.