Skip to content

fix(itemcontainer): pointer state tracking - #23056

Merged
ramezgerges merged 5 commits into
unoplatform:masterfrom
ramezgerges:selectorbar_visual_states
Apr 29, 2026
Merged

ramezgerges merged 5 commits into
unoplatform:masterfrom
ramezgerges:selectorbar_visual_states

Conversation

@ramezgerges

Copy link
Copy Markdown
Contributor

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:

Other information ℹ️

Copilot AI review requested due to automatic review settings April 15, 2026 15:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 isPointerOver from OnPointerMoved, relying on PointerEntered/PointerExited instead.
  • 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.

@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 207403 has failed on Uno.UI - CI.

@ramezgerges

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

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

@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 207595 has failed on Uno.UI - CI.

@ramezgerges
ramezgerges merged commit f9bf31d into unoplatform:master Apr 29, 2026
45 checks passed
@ramezgerges
ramezgerges deleted the selectorbar_visual_states branch April 29, 2026 08:06
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators May 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants