You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The form will not be submitted - press submit once more, the form will be submitted
However, it will submit the form directly when you upload a file:
Open the example application
Upload a file and press submit
The form will be submitted directly
Please note the form has both submitOnSuccess and triggerUploadOnSubmit. See my previously (probably related) issue #5057 and PR where this behavior has been introduced: #5058
Expected behavior
The form should be submitted directly, even when there are no files uploaded.
Actual behavior
It looks like it has to do with the logic in the handleFormSubmit-function:
The ev.preventDefault() prevents the form from being submitted. I assume that, because there isn't an upload completing, the submission of the form will never be called, however the Uppy-element gets completed and therefore the next click on the submit button of the form will succeed because the if condition at line 92 will not be hit.
The text was updated successfully, but these errors were encountered:
Initial checklist
Link to runnable example
https://stackblitz.com/edit/vitejs-vite-bj2dju?file=main.js
Steps to reproduce
However, it will submit the form directly when you upload a file:
Please note the form has both
submitOnSuccess
andtriggerUploadOnSubmit
. See my previously (probably related) issue #5057 and PR where this behavior has been introduced: #5058Expected behavior
The form should be submitted directly, even when there are no files uploaded.
Actual behavior
It looks like it has to do with the logic in the
handleFormSubmit
-function:https://github.com/transloadit/uppy/blob/main/packages/%40uppy/form/src/index.ts#L91-L93
The
ev.preventDefault()
prevents the form from being submitted. I assume that, because there isn't an upload completing, the submission of the form will never be called, however the Uppy-element gets completed and therefore the next click on the submit button of the form will succeed because the if condition at line 92 will not be hit.The text was updated successfully, but these errors were encountered: