-
Notifications
You must be signed in to change notification settings - Fork 47.4k
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
Support invalid event within Form elements #5152
Comments
I'm taking a look at this as a first bug - from the docs and some testing, the That is to say:
will not log
will log Does this match the expected behaviour, and if so do we want the |
We should match the DOM and fire it on the element (not the form). We already have support for these events which don't bubble. Most of our events are added at the document level and then delegated but the ones which don't bubble need to be added to specific elements on creation. Here's how we're doing it for forms and the submit & reset events: https://github.com/facebook/react/blob/master/src/renderers/dom/shared/ReactDOMComponent.js#L403-L416 Thanks for taking this on! Feel free to get a PR up before it's completely ready if you have questions / need help. |
Thanks Paul, good to know I was looking in the right place! Will update when I have had time to create a PR or if I need any help :) Cheers
|
Fixes facebook#5152 Fix tests
Hey, I've put together a PR at #5187 - it would be great to get your feedback on it. A couple of specific questions I had:
Any feedback appreciated, this does seem to work but I'm totally new to the React code so not sure if the way I've gone about it is suitable or not! Cheers, |
@tomduncalf Awesome! |
Ref: https://developer.mozilla.org/en-US/docs/Web/Events/invalid
The text was updated successfully, but these errors were encountered: