Skip to content

MudDialog: Prevent default on close button to not trigger validations#12332

Merged
danielchalmers merged 2 commits intoMudBlazor:devfrom
spingee:feature/dialog_prevent_default
Jan 11, 2026
Merged

MudDialog: Prevent default on close button to not trigger validations#12332
danielchalmers merged 2 commits intoMudBlazor:devfrom
spingee:feature/dialog_prevent_default

Conversation

@spingee
Copy link
Contributor

@spingee spingee commented Dec 21, 2025

This is small one.
When there is form with validated fields in dialog, closing dialog will trigger validations on focused input resulting in brief red noise.

@mudbot mudbot bot changed the title Prevent default on dialog close button to not trigger validations MudDialog: Prevent default on close button to not trigger validations Dec 21, 2025
@mudbot mudbot bot added the bug Unexpected behavior or functionality not working as intended label Dec 21, 2025
@versile2
Copy link
Contributor

The change is simple enough and I do approve. Is there any way to add a test to protect this change in the future.

Copy link
Contributor

@versile2 versile2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to see a test for this if possible, but this is a simple change without any downside I can find.

@danielchalmers danielchalmers removed their request for review January 2, 2026 20:58
@danielchalmers danielchalmers added the needs: tests A maintainer has explicitly asked for associated test cases to be added to this pull request label Jan 2, 2026
@spingee spingee force-pushed the feature/dialog_prevent_default branch from 0bb0e7d to 3790756 Compare January 10, 2026 11:38
@spingee
Copy link
Contributor Author

spingee commented Jan 10, 2026

@versile2 i have added test

@danielchalmers danielchalmers merged commit 6ed8ba1 into MudBlazor:dev Jan 11, 2026
6 checks passed
@danielchalmers
Copy link
Member

Thank you!

This was referenced Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Unexpected behavior or functionality not working as intended needs: tests A maintainer has explicitly asked for associated test cases to be added to this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants