You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Your app slightly lags and you have an ItemsRepeater in a ScrollViewer. When you start scrolling down - there is a big chance of scroll resetting to 0 position.
To Reproduce
Steps to reproduce the behavior:
Sorry for not providing an example project with a repro - it's a lot of time to emulate this conditions.
Desktop (please complete the following information):
We have repro on any desktop platform
Additional context
I've debugged deep. The bug is based on two behaviors:
ItemsRepeater recycles elements by setting them position of another element, or -10k position if there is nothing to recycle.
ScrollContentPresenter saves the link to the anchor element and calculates everything from it. see TrackAnchor local method.
There is a chance that anchor element gets recycled by ItemsRepeater
Position of element jumps to other elements position or -10k if hidden, so offset of ScrollViewer tries to set equally in invalid or even negative area.
Coerce logic resets negative value to zero offset on negative value. Or scroll just jumps to other position.
So to fix this I think ScrollContentPresenter should check for anchor getting recycled.
I've temporarily fixed this by a hack in our app: If scroll is resets to zero without any point - I'm restoring old offset.
The text was updated successfully, but these errors were encountered:
Describe the bug
Your app slightly lags and you have an
ItemsRepeater
in aScrollViewer
. When you start scrolling down - there is a big chance of scroll resetting to 0 position.To Reproduce
Steps to reproduce the behavior:
Sorry for not providing an example project with a repro - it's a lot of time to emulate this conditions.
Expected behavior
Scroll do not resets to 0 position.
Screenshots
We've attached a video
Desktop (please complete the following information):
Additional context
I've debugged deep. The bug is based on two behaviors:
ItemsRepeater
recycles elements by setting them position of another element, or -10k position if there is nothing to recycle.ScrollContentPresenter
saves the link to the anchor element and calculates everything from it. seeTrackAnchor
local method.ScrollViewer
tries to set equally in invalid or even negative area.So to fix this I think
ScrollContentPresenter
should check for anchor getting recycled.I've temporarily fixed this by a hack in our app: If scroll is resets to zero without any point - I'm restoring old offset.
The text was updated successfully, but these errors were encountered: