`$submitting` is reset when `form` element is removed from DOM
enhancement
If you submit a form and then remove the form element from the DOM, `$submitting` becomes `false` immediately. Removing a form from the DOM while still having access to `$submitting` can be useful for example if the form is in a dialog, and you close the dialog on submit and want to show a spinner or something while the form is `submitting`.
Reproduction: https://www.sveltelab.dev/1yn0a449f76vi66?files=.%2Fsrc%2Froutes%2F%2Bpage.svelte
3 条评论