Correct nested TreeViewItem selection behaviour on pointer release - #21705
Merged
Conversation
|
You can test this PR using the following package version. |
Member
|
You can use the existing |
Member
|
Aside from the missing tests, it works as advertised. |
Contributor
Author
|
I added the tests, but I'm not happy about having to emulate Avalonia's gesture/capture logic in the test. The mouse helper class is too low-level for this purpose. |
TomEdwardsEnscape
force-pushed
the
fixes/treeview-nestedselection
branch
from
July 17, 2026 12:31
a3662d4 to
ccfd5b3
Compare
TomEdwardsEnscape
force-pushed
the
fixes/treeview-nestedselection
branch
from
July 22, 2026 09:42
ccfd5b3 to
154661c
Compare
|
You can test this PR using the following package version. |
MrJul
pushed a commit
that referenced
this pull request
Jul 29, 2026
âĶ21705) * Correct nested TreeViewItem selection behaviour on pointer release * Add unit tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes #21427, in which swiping over nested
TreeViewItemcontainers incorrectly selects items. I found that there are actually two scenarios:Both a resolved. The changes can be tested with a mouse by applying this style:
I tried to write a unit test but found that hit testing isn't supported in the headless unit test application used by other
TreeViewtests.Breaking changes
None
Obsoletions / Deprecations
None
Fixed issues
Fixes #21427