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

fix: validate only if the form element is mounted #538

Merged
merged 1 commit into from
Mar 24, 2024

Conversation

edmundhung
Copy link
Owner

Fix #524.

When a dialog is closed, we might lose focus from the input and trigger validation while the form element is already unmounted. This makes sure form validation will only happens if the form element is still connected to the DOM.

@edmundhung edmundhung merged commit 369e091 into main Mar 24, 2024
3 checks passed
@edmundhung edmundhung deleted the avoid-validate-on-dialog-closed branch March 24, 2024 19:53
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

Successfully merging this pull request may close these issues.

Closing dialog submits form anyways.
1 participant