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

Massive bug with handleTaggedFormSubmitEvent submitting a prevented form #4693

Open
2 tasks done
shahyar opened this issue Oct 16, 2024 · 1 comment
Open
2 tasks done

Comments

@shahyar
Copy link

shahyar commented Oct 16, 2024

Past Issues Searched

  • I have searched open and closed issues to make sure that the bug has not yet been reported

Issue is a Bug Report

  • This is a bug report and not a feature request, nor asking for self-hosted support

Using official Plausible Cloud hosting or self-hosting?

Self-hosting

Describe the bug

When you assign plausible-event-name to a <form>, the Plausible JS will RE-SUBMIT THE FORM. This behavior is completely undocumented.

This will cause a controlled form (ie. in a React app) to be re-submitted, even if I didn't want it to be submitted.

I'm honestly shocked somebody thought this was a good idea.

Expected behavior

First, the handler should check event.defaultPrevented BEFORE attempting to defaultPrevent itself and then re-submit.

Second, the documentation should show a massive red warning with why you should not use this on a controlled <form>.

Screenshots

No response

Environment

- OS: all
- Browser: all
- Browser Version: all

Likely affects Plausible Cloud.
@ukutaht
Copy link
Contributor

ukutaht commented Oct 18, 2024

Thanks you for the bug report @shahyar!

Your tone, however, is unacceptable. If you cannot stay respectful you will not be allowed to participate in any future discussions.

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

2 participants