bouncer icon indicating copy to clipboard operation
bouncer copied to clipboard

Documentation: form onsubmit preventDefault no effect without disableSubmit true

Open stevenjmarsh opened this issue 4 years ago • 0 comments

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.

stevenjmarsh avatar Feb 04 '20 20:02 stevenjmarsh