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

Issue with smooth scroll during item resize after upgrading to 0.27 #380

Closed
aeharding opened this issue Feb 15, 2024 · 4 comments · Fixed by #382
Closed

Issue with smooth scroll during item resize after upgrading to 0.27 #380

aeharding opened this issue Feb 15, 2024 · 4 comments · Fixed by #382
Assignees

Comments

@aeharding
Copy link
Sponsor Contributor

Describe the bug

When I change an item height and smooth scroll to its index at the same time, Virtua is no longer scrolling to the correct position. This was working in 0.26 so something has changed.

To Reproduce

  1. Pull down this storybook file and open storybook -> Advanced: Resize and scroll
  2. Scroll so item top edge is just outside viewport
  3. Tap "Resize and Smooth Scroll"
  4. Observe scroll is not smooth and does not jump to correct location and scroll sometimes does not occur (see after video).
  5. Additionally, in Safari there are some new glitches in 0.27.0 where user scroll after doing the resize + smooth scroll can cause items to hide/not render until the next user scroll. I haven't created a reproduction for this yet, but it happens in Voyager with the swipe to collapse with virtua 0.27.0. I can validate any potential fix to see if it is resolved :)

Expected behavior

0.26.0 behavior.

Platform:

I've tested:

  • OS: [Windows, MacOS, Linux, Android, iOS] iOS, MacOS
  • Browser: [Chrome, Firefox, Safari, Edge] Firefox, Safari
  • Version of this package: [x.x.x] 0.27.0
  • Version of framework: [react, vue, solid-js] react 18.2.0

Additional context

I am happy to make a PR for the storybook reproduction, if it would help.

Before (0.26.0 - good) After (0.27.0 - bad)
before.mp4
after.mp4
@inokawa inokawa self-assigned this Feb 16, 2024
@inokawa
Copy link
Owner

inokawa commented Feb 16, 2024

@aeharding

I am happy to make a PR for the storybook reproduction, if it would help.

Thanks! Could you make a PR for that?
https://inokawa.github.io/virtua/?path=/story/basics-vlist--with-state is a similar story but it seems like it's not enough.

@inokawa
Copy link
Owner

inokawa commented Feb 17, 2024

At least the issue except 5 should be fixed in 0.27.1.
Feel free to reopen or open another issue if you noticed something.

@inokawa
Copy link
Owner

inokawa commented Feb 17, 2024

I found that smooth scrolling + resizing to smaller size can cause blank sometimes.
It was fixed in 0.27.2.

@aeharding
Copy link
Sponsor Contributor Author

Thank you! That is working perfect :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants