Skip to content

Formaction on a button fix#92

Merged
haacked merged 5 commits intomainfrom
haacked/formaction-fix
Jan 6, 2024
Merged

Formaction on a button fix#92
haacked merged 5 commits intomainfrom
haacked/formaction-fix

Conversation

@haacked
Copy link
Owner

@haacked haacked commented Jan 2, 2024

Fixes #39

The library has to do a bit of work to hook the form submit event, do its thing, and then recreate the submit event. However, we didn't factor in that the submit button might have a formaction attribute on it. Now we do.

@haacked haacked requested a review from dahlbyk January 2, 2024 20:01
@haacked haacked requested a review from dahlbyk January 5, 2024 21:41
@haacked haacked force-pushed the haacked/formaction-fix branch from b2402b4 to 2a469d7 Compare January 5, 2024 21:47
haacked and others added 5 commits January 5, 2024 13:47
When there's an input field, the formaction on a button doesn't work.

Also add example with no formaction
When clicking a submit button with a formaction, we need to honor that formaction.
Co-authored-by: Keith Dahlby <dahlbyk@gmail.com>
Co-authored-by: Keith Dahlby <dahlbyk@gmail.com>
@haacked haacked force-pushed the haacked/formaction-fix branch from 2a469d7 to 95b6ad1 Compare January 5, 2024 21:48
@haacked haacked merged commit 2c76d35 into main Jan 6, 2024
@haacked haacked deleted the haacked/formaction-fix branch January 6, 2024 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validation breaks the formaction attribute

2 participants