uno icon indicating copy to clipboard operation
uno copied to clipboard

`ListViews` should not recycle the first view or the currently focused view

Open ramezgerges opened this issue 1 year ago • 1 comments

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 avatar Oct 24 '23 09:10 ramezgerges

See details at https://github.com/unoplatform/uno/issues/16698 for a user-facing impact of thus bug.

Youssef1313 avatar May 15 '24 08:05 Youssef1313