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

ListViews should not recycle the first view or the currently focused view #14080

Open
ramezgerges opened this issue Oct 24, 2023 · 1 comment
Labels
area/listview 📃 Categorizes an issue or PR as relevant to the ListView control difficulty/medium 🤔 Categorizes an issue for which the difficulty level is reachable with a good understanding of WinUI kind/bug Something isn't working project/items 🧾 Categorizes an issue or PR as relevant to items (ItemsControl, ItemsRepeater, ...)

Comments

@ramezgerges
Copy link
Contributor

Current behavior

Currently, any view that's not visible and is not within CacheLength will be recycled.

Expected behavior

On WinUI, the first view is just never recycled. I'm not sure if there are specific scenarios where it is, but from my testing it seems like it just never gets recycled. Also, if a view is currently focused (either through mouse or keyboard), the view is never recycled even if scrolled out of view. This makes sense because we wouldn't want to lose focus just because of scrolling i.e. if we focus something, scroll away and back, the focus shouldn't change. The moment the focused out-of-visible-area view loses focus, it gets recycled.

How to reproduce it (as minimally and precisely as possible)

Most listview samples will do, e.g. ListView_Aligned_Left.

Workaround

No response

Works on UWP/WinUI

None

Environment

No response

NuGet package version(s)

No response

Affected platforms

No response

IDE

No response

IDE version

No response

Relevant plugins

No response

Anything else we need to know?

No response

@ramezgerges ramezgerges added kind/bug Something isn't working triage/untriaged Indicates an issue requires triaging or verification difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. labels Oct 24, 2023
@MartinZikmund MartinZikmund added area/listview 📃 Categorizes an issue or PR as relevant to the ListView control project/items 🧾 Categorizes an issue or PR as relevant to items (ItemsControl, ItemsRepeater, ...) difficulty/medium 🤔 Categorizes an issue for which the difficulty level is reachable with a good understanding of WinUI and removed triage/untriaged Indicates an issue requires triaging or verification difficulty/tbd Categorizes an issue for which the difficulty level needs to be defined. labels Oct 25, 2023
@MartinZikmund MartinZikmund changed the title ListViews should not recycle the first view or the currently focused view ListViews should not recycle the first view or the currently focused view Oct 25, 2023
@Youssef1313
Copy link
Member

See details at #16698 for a user-facing impact of thus bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/listview 📃 Categorizes an issue or PR as relevant to the ListView control difficulty/medium 🤔 Categorizes an issue for which the difficulty level is reachable with a good understanding of WinUI kind/bug Something isn't working project/items 🧾 Categorizes an issue or PR as relevant to items (ItemsControl, ItemsRepeater, ...)
Projects
None yet
Development

No branches or pull requests

3 participants