Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TreeView: Dragging and dropping a selected item in single selection mode causes the item to be unselected #3096

Closed
Felix-Dev opened this issue Aug 11, 2020 · 2 comments
Labels

Comments

@Felix-Dev
Copy link
Contributor

Felix-Dev commented Aug 11, 2020

Describe the bug
Given a TreeView in single-selection mode, dragging and then dropping a selected item causes the item to be unselected:

treeview-singleselection-issue

I view this as a bug. A drop should not cause the selected item to be unselected. In fact, it works as expected in multi-selection mode:

treeview-multiselection
(The issue you see in the above where the parent nodes' selection state is not updated after the drag and drop operation is being tracked in issue #3092.)

Steps to reproduce the bug

Steps to reproduce the behavior:

  1. Open the XAML Controls Gallery and go to the TreeView page
  2. Scroll down to the single-selection TreeView drag and drop example
  3. Do the same (or similar) steps as shown in the GIF.

Expected behavior
The drag & drop'ed TreeViewItem should remain selected:
image

Version Info

NuGet package version:
WinUI 2.4 and WinUI 2.5 previews

Windows 10 version Saw the problem?
Insider Build (xxxxx)
May 2020 Update (19041) Yes
November 2019 Update (18363)
May 2019 Update (18362)
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop Yes
Xbox
Surface Hub
IoT

Additional context
I would like to fix this.

@msft-github-bot msft-github-bot added the needs-triage Issue needs to be triaged by the area owners label Aug 11, 2020
@ranjeshj ranjeshj added area-TreeView team-Controls Issue for the Controls team labels Aug 11, 2020
@StephenLPeters
Copy link
Contributor

Single selection we are inheriting from list view and multi select we rolled our own solution, so i'm not surprised there is differences. Interestingly list view does keep selection during drag and drop, so we must be doing something to affect it.

@github-actions
Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants