Skip to content

$submitting is reset when form element is removed from DOM #663

@Stadly

Description

@Stadly

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions