Summary: | Clearing of dirty for :user-invalid happens on wrong form event | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Simon Welsh <simon> | ||||
Component: | CSS | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED DUPLICATE | ||||||
Severity: | Normal | CC: | ntim, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | Safari Technology Preview | ||||||
Hardware: | Mac (Intel) | ||||||
OS: | macOS 12 | ||||||
Attachments: |
|
I'll address this in bug 257988. *** This bug has been marked as a duplicate of bug 257988 *** |
Created attachment 466673 [details] example.html When submitting a form with validation errors, the :user-invalid dirty state is reset. When resetting a form, it is not. In the attached form, dirty the 'not-an-email' field with an invalid email address. The border will become red on blur. If clicking the submit button, the form will fail validation but the red border will clear. If clicking the reset button, the email field will return to its starting value but maintain the red border. I'd expect these behaviours to be reversed. That is submitting a form does not clear the dirty tracking and resetting a form does.