microsoft / microsoft/react-native-windows
Pointer capture is broken in Popup content in XAML Islands
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 17.3k
- Forks
- 1.2k
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 33
Description
Problem Description
This bug probably belongs in microsoft/microsoft-ui-xaml, but there seems to be an issue with native pointer capture in TouchEventHandler when dealing with popup content (either PopupViewManager or FlyoutViewManager) when running in the context of a XAML Islands app.
Steps To Reproduce
- Open RNTester in playground-win32.sln
- Open the Flyout example
- Click left-button down and hold on some button in the Flyout
- Drag outside of the Flyout
- Release the pointer
- Immediately try to press another button in the flyout
- Observe debug assert failure because a previous pointer sequence was not closed out
Expected Results
The debug assert should not occur.
The reason the assertion failure occurs is because we never receive any kind of OnPointerConcluded event (released, capture lost, canceled, etc.).
I tried a few things, like saying "if we can't have pointer capture, let's just always cancel the gesture sequence OnPointerExit", but unfortunately, PointerExited also does not fire in XAML Islands for pointers in Flyout or Popup components.
I'm not sure what the right mitigation is. I'm guessing this is not something that would be a candidate for a patch release, and even still it impacts users who have not upgraded their OS.
CLI version
npx react-native -v
Environment
npx react-native info
Target Platform Version
None
Target Device(s)
No response
Visual Studio Version
None
Build Configuration
None
Snack, code example, screenshot, or link to a repository
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure from RNTester in playground-win32.sln using the Flyout example. Read TouchEventHandler together with PopupViewManager and FlyoutViewManager to trace pointer capture and conclusion events in XAML Islands. Done means the described drag-and-release sequence no longer leaves the pointer sequence open or triggers the debug assert.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, react-native
- Domain
- desktop, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100