Skip to content

fix(itemcontainer): snapshot isOver before capture release (backport #23877) - #23891

Merged
agneszitte merged 2 commits into
release/stable/6.6from
mergify/bp/release/stable/6.6/pr-23877
Jul 27, 2026
Merged

agneszitte merged 2 commits into
release/stable/6.6from
mergify/bp/release/stable/6.6/pr-23877

Conversation

@mergify

@mergify mergify Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

GitHub Issue: closes #23876

PR Type:

🐞 Bugfix

What changed? 🚀

Tapping a SelectorBarItem (or any ItemsView-based selection) with touch or pen does nothing on Skia targets, while mouse clicks work. #23208 fixed the mouse path only.

ItemContainer.OnPointerReleased calls ReleasePointerCapture before evaluating the item-invoke gate. On managed pointers that release synchronously raises PointerCaptureLost → ProcessPointerCanceled, which resets the touch/pen pointer-over state — so the gate's IsPointerOver() check fails and ItemInvoked(PointerReleased) (the only trigger ItemsView selects on; Tap is a selection no-op) is never raised.

This PR snapshots the pointer-over state before releasing the capture and uses the snapshot in the invoke gate. This fixes the re-entrancy at its source for all pointer device types, while keeping WinUI's genuine-cancel semantics (a real cancellation, e.g. a scroll stealing the pointer, still resets the touch/pen over-state and its visual state).

Validation (Skia Desktop macOS, Release):

  • New runtime test SelectorBarTests.VerifySelectorBarItemBecomesSelectedAfterTouchTap (touch-injection twin of the fix(selectorbar): adjust tracking of isOver mouse state #23208 mouse test): fails before the fix, passes after.
  • SelectorBarTests 6/6 passed (including the mouse test and the release-outside-bounds visual-state guard — no regression).
  • ItemsViewTests 10/10 passed.

PR Checklist ✅

🤖 Generated with Claude Code

https://claude.ai/code/session_014Cwnh87BjMzYGmCtEcVYhf


This is an automatic backport of pull request #23877 done by [Mergify](https://mergify.com).

@agneszitte

Copy link
Copy Markdown
Member

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@unodevops

Copy link
Copy Markdown
Contributor

@agneszitte
agneszitte merged commit d96984d into release/stable/6.6 Jul 27, 2026
43 of 46 checks passed
@agneszitte
agneszitte deleted the mergify/bp/release/stable/6.6/pr-23877 branch July 27, 2026 19:30
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.

3 participants