Repository navigation
fix(itemcontainer): pointer state tracking - #23056
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adjusts ItemContainer pointer handling to improve visual-state correctness when pointer interactions end outside the container, and adds a runtime test to validate SelectorBarItem state transitions for that scenario.
Changes:
- Stop updating
isPointerOverfromOnPointerMoved, relying onPointerEntered/PointerExitedinstead. - Capture the pointer on press and release capture on release/cancel to improve pointer state tracking.
- Add a runtime test that presses a
SelectorBarItem, moves outside its bounds, releases, and verifies the visual state returns to normal.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
src/Uno.UI/UI/Xaml/Controls/ItemContainer/ItemContainer.cs |
Updates pointer capture and click gating logic to reduce stuck visual states and avoid clicks when released outside. |
src/Uno.UI.RuntimeTests/MUX/Microsoft_UI_Xaml_Controls/SelectorBar/SelectorBarTests.cs |
Adds an input-injection driven test covering release-outside-bounds visual state behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23056/wasm-skia-net9/index.html |
|
|
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23056/wasm-skia-net9/index.html |
|
|
GitHub Issue: closes https://github.com/unoplatform/private/issues/1074
PR Type:
What is the current behavior? 🤔
What is the new behavior? 🚀
PR Checklist ✅
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Runresults.Other information ℹ️