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

Documentation: form onsubmit preventDefault no effect without disableSubmit true #53

Open
stevenjmarsh opened this issue Feb 4, 2020 · 0 comments

Comments

@stevenjmarsh
Copy link

Thanks for providing Bouncer, a super handy and light package!

One development experience issue I ran into, was trying to preventDefault from the form onsubmit event, and it appeared to have no effect.

I called preventDefault in my onsubmit handler, and was awaiting a fetch response, but the form would always submit, before I could process the response.

Not until I spotted the 'disableSubmit' option, did I realize I had to set that as true to completely prevent submit from occurring.

Maybe there is opportunity to state that more explicitly in the readme, in hopes of helping someone else avoid running in to this scenario. Or perhaps, I just missed something obvious, and should have read the docs in greater detail!

Regardless, I find Bouncer very practical and useful!

Much appreciated. Steve.

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

No branches or pull requests

1 participant