Skip to content

Fix Calendar mouse capture preventing dialog close on first click - #4117

Open
MORTEM3845 wants to merge 1 commit into
MaterialDesignInXAML:masterfrom
MORTEM3845:fix/calendar-dialog-mouse-capture
Open

MORTEM3845 wants to merge 1 commit into
MaterialDesignInXAML:masterfrom
MORTEM3845:fix/calendar-dialog-mouse-capture

Conversation

@MORTEM3845

@MORTEM3845 MORTEM3845 commented Oct 25, 2026 •

Copy link
Copy Markdown

Fixes #3971.

Release CalendarItem's own mouse capture after left mouse-up, including handled events, so the first click on OK closes the dialog. Selection finishes before capture is released, preserving range dragging.

Validation: builds for net462, net8.0-windows and net10.0-windows. Local XamlTest checks passed on .NET 10 with MD2/MD3: both DialogHost styles, SingleRange/MultipleRange dragging, keyboard and month navigation, and standalone Calendar clicks. Disabling the fix reproduced the lost first click. The main UI test project could not build locally due to TUnit compilation errors.

This branch has not been deployed

No deployments
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.

Focus issue with Calendar in Dialog

1 participant