Summary
VirtualRow with scroll="always" behaves differently from Row with the same
prop. With Row, the focused child is kept at offset. With VirtualRow, the
focused child settles somewhere in the middle of the row, and navigating N items
forward then N items back does not return the row to its original scroll
position — it ends up offset by one or more item widths, which leaves the
focused item partly or fully off-screen
Expected
Navigating right N times then left N times returns to the starting item with the
row at its original scroll offset, and the focused item sits at offset
throughout — matching Row's documented scroll="always" behaviour.
Actual
The focused item does not sit at offset, and after the round trip the row is
displaced by one or more item widths. The first item ends up scrolled off the
left edge while still being the focused item.
Steps to reproduce
- Render a
VirtualRow with scroll="always", an offset, displaySize of
about 4, bufferSize of 2, and roughly 13 uniform items.
- Focus the first item. Note the row's scroll position.
- Press Right 6 times, one press at a time.
- Press Left 6 times, one press at a time.
- The selected index is back to 0, but the row's scroll position is not back to
its starting value.
Environment
@solidtv/solid v1.5.1
- WebGL renderer (
WebGlCoreRenderer), 1920x1080
- Reproduced on a Samsung Tizen emulator and in desktop Chrome
cc @chiefcll — tagging you to get your thoughts on this, as it looks like you might have context on the implementation of this feature!
Summary
VirtualRowwithscroll="always"behaves differently fromRowwith the sameprop. With
Row, the focused child is kept atoffset. WithVirtualRow, thefocused child settles somewhere in the middle of the row, and navigating N items
forward then N items back does not return the row to its original scroll
position — it ends up offset by one or more item widths, which leaves the
focused item partly or fully off-screen
Expected
Navigating right N times then left N times returns to the starting item with the
row at its original scroll offset, and the focused item sits at
offsetthroughout — matching
Row's documentedscroll="always"behaviour.Actual
The focused item does not sit at
offset, and after the round trip the row isdisplaced by one or more item widths. The first item ends up scrolled off the
left edge while still being the focused item.
Steps to reproduce
VirtualRowwithscroll="always", anoffset,displaySizeofabout 4,
bufferSizeof 2, and roughly 13 uniform items.its starting value.
Environment
@solidtv/solidv1.5.1WebGlCoreRenderer), 1920x1080cc @chiefcll — tagging you to get your thoughts on this, as it looks like you might have context on the implementation of this feature!