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

Dispatching invalid at <form> #4626

Closed
annevk opened this issue May 15, 2019 · 5 comments · Fixed by #5507
Closed

Dispatching invalid at <form> #4626

annevk opened this issue May 15, 2019 · 5 comments · Fixed by #5507
Labels
good first issue Ideal for someone new to a WHATWG standard or software project removal/deprecation Removing or deprecating a feature topic: forms

Comments

@annevk
Copy link
Member

annevk commented May 15, 2019

I also found none of Chrome, Firefox and Safari dispatches invalid event targeting the <form>.

Originally posted by @tkent-google in #4621 (comment)

It seems we should remove this functionality given that nobody complained about it for so long.

@tkent-google
Copy link
Contributor

I confirmed Edge didn't do it too.

@annevk
Copy link
Member Author

annevk commented May 17, 2019

To fix this, step 6.3.1 of https://html.spec.whatwg.org/#concept-form-submit needs to be removed. A WPT test to confirm the event does not fire would also be good.

@annevk annevk added the good first issue Ideal for someone new to a WHATWG standard or software project label May 17, 2019
@rahulpurohit29
Copy link
Contributor

So removing The point 6.3.1 would solve this issue from https://html.spec.whatwg.org/#concept-form-submit. Am I right?

@tkent-google
Copy link
Contributor

@rahulpurohit29
Right. Please refer to annevk's last comment.

@jorams
Copy link

jorams commented Oct 8, 2019

There is also a note at the bottom of 4.10.1.4 that should be updated or removed:

When a form is submitted, invalid events are fired at each form control that is invalid, and then at the form element itself. This can be useful for displaying a summary of the problems with the form, since typically the browser itself will only report one problem at a time.

annevk added a commit that referenced this issue May 4, 2020
Also tidy up some formatting.

Tests: ...

Closes #4626.
annevk added a commit that referenced this issue May 4, 2020
Also tidy up some formatting.

Tests: web-platform-tests/wpt#23380.

Closes #4626.
bors-servo added a commit to servo/servo that referenced this issue Jul 5, 2020
Do not fire `invalid` event on form elements

This is a follow-up to my [previous PR](#27100) suggested by @gterzian.

`invalid` event on the `<form>` element has been [recently removed](whatwg/html#4626) from the spec.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #27133

<!-- Either: -->
- [x] [WPT test](https://github.com/servo/servo/blob/master/tests/wpt/web-platform-tests/html/semantics/forms/form-submission-0/historical.window.js) marked as passing
bors-servo added a commit to servo/servo that referenced this issue Jul 5, 2020
Do not fire `invalid` event on form elements

This is a follow-up to my [previous PR](#27100) suggested by @gterzian.

`invalid` event on the `<form>` element has been [recently removed](whatwg/html#4626) from the spec.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #27133

<!-- Either: -->
- [x] [WPT test](https://github.com/servo/servo/blob/master/tests/wpt/web-platform-tests/html/semantics/forms/form-submission-0/historical.window.js) marked as passing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Ideal for someone new to a WHATWG standard or software project removal/deprecation Removing or deprecating a feature topic: forms
Development

Successfully merging a pull request may close this issue.

4 participants