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

Reversed vertical scrolling and infinite scroll #870

Open
2 tasks done
Oleksii14 opened this issue May 22, 2024 · 2 comments
Open
2 tasks done

Reversed vertical scrolling and infinite scroll #870

Oleksii14 opened this issue May 22, 2024 · 2 comments

Comments

@Oleksii14
Copy link

Oleksii14 commented May 22, 2024

Clear and concise description of the problem

I tried to implement a reversed vertical scrolling behaviour using DynamicScroller and infinite scroll behaviour like in the average chat. I also checked the Chat demo before the implementation.

The first thing to note is that the chat demo doesn't contain the infinite scroll behaviour like in the real chats. Also, during the stream, the scroll position is always being reset to the bottom.

Approaches I used:

  1. flex-direction: column-reverse applied to the scroller element. this causes the items to disappear from the view at all.
  2. calling scrollToBottom after the scroller init which works well only with the items that have a fixed height (for example, when the images are rendered, the scrollToBottom doesn't actually scroll to the bottom and the scroll position is somewhere in the middle of the container). Also, when the infinite scroll logic adds new items to the list, the scroll position is reset to the top position of the scroll container.
  3. page mode combined with flex-direction: column-reverse. works, but causes scrolling glitches

Am I missing something or this case was not covered? It would be great to have a working example. FYI the discussions page is not working in this repo 😢

Suggested solution

Alternative

No response

Additional context

No response

Validations

  • Read the docs.
  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
@Oleksii14
Copy link
Author

Monosnap.screencast.2024-05-22.23-16-31.mp4

Here is a repo and a video with the reproduction of one of the described cases (see scrolling glitches after scroll to bottom)

@brunoinds
Copy link

Same error here. In my case, its not required to reach the bottom to starts to glitch when scrolling up.

I'm using Ionic + Vue, and it seams the problem only occurs when using mobile devices, like Safari for iOS. Safari for macOS, or Google Chrome does not reproduces the error.

ScreenRecording_10-24-2024.11-39-06_1.mov

Any thoughts on this issue?

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

No branches or pull requests

2 participants