Fix infinite resize issue with scrollbar set to "always" #485
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue: in reversed list with small number of items at some breakpoint infinite resize can happen.
Precondition: show scrollbar set to "always" in system setting.
The issue happens in Chrome and Edge, and doesn't happen in Safari
Video:
Screen.Recording.2024-08-08.at.10.18.55.mov
I couldn't fully understand how it works, but it depends on the styles of the element that wraps the virtual list component. In Codesandbox you can find 2 examples - where the issue happens and where it doesn't.
Experimentally I found out that setting
overflow-y: hidden
to virtual list items wrapper element fixes the issue. It looks like it's safe to add this style (Or it isn't? 😁 I see that some e2e tests are failed. Is is because of my changes?).Note: I haven't tested horizontal scroll and don't know if it requires different styles