We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I use submitOnSuccess on the form plugin. When enabled uppy calls
submitOnSuccess
this.form.submit()
If you - like me - happen to have your own form submit event handler, which does additional stuff, this handler won't get triggered by uppy.
So what about calling something like
this.form.dispatchEvent(new Event('submit'))
or
this.form.requestSubmit()
(on modern browsers) which should both send the submit event.
Does that make sense, what do you think? Or am I missing something here?
ATM I do not see any other option to get your own submit handler triggered by uppy.
The text was updated successfully, but these errors were encountered:
If that works for both cases then I think it's good! Willing to make a PR and test it?
Sorry, something went wrong.
Yes, I would, this will take a few days, though...
Any more suggestions, what browser compatiblity do we need? see https://caniuse.com/mdn-api_htmlformelement_requestsubmit Should we test for browser compatibility like this?
if (form.requestSubmit) { form.requestSubmit(); } else { form.submit(); }
We no longer support IE so support seems fine 👍
Great, thank you @Murderlon! I am sorry for letting this slip through...
Successfully merging a pull request may close this issue.
Initial checklist
Problem
I use
submitOnSuccess
on the form plugin. When enabled uppy callsIf you - like me - happen to have your own form submit event handler, which does additional stuff, this handler won't get triggered by uppy.
Solution
So what about calling something like
or
(on modern browsers)
which should both send the submit event.
Does that make sense, what do you think? Or am I missing something here?
Alternatives
ATM I do not see any other option to get your own submit handler triggered by uppy.
The text was updated successfully, but these errors were encountered: