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

Formaction on a button fix #92

Merged
merged 5 commits into from
Jan 6, 2024
Merged

Formaction on a button fix #92

merged 5 commits into from
Jan 6, 2024

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
src/index.ts Outdated Show resolved Hide resolved
src/index.ts Outdated Show resolved Hide resolved
src/index.ts Outdated Show resolved Hide resolved
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 <[email protected]>
@haacked haacked merged commit 2c76d35 into main Jan 6, 2024
1 check passed
@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