-
-
Notifications
You must be signed in to change notification settings - Fork 20
Strange effect with inverted datasource #115
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
Comments
Surprisingly it works well with Safari |
@DaveLomber May I ask you to look at this stackblitz demo, where I reproduced your logic? Seems it works properly (on Mac Chrome). Could you please fork it and update styles and whatever else, so that the issue becomes apparent? |
I can confirm with your example it works well but in my app I have this effect. I tried to get the root cause but still no luck.. |
@dhilt this is indeed something with underlaying buffered items I spent almost the whole day trying to debug the lib And in the end I can make a demo https://stackblitz.com/edit/angular-ngx-ui-scroll-1-2-2-inverted-datasource to have this issue we just need to comment a style of a viewport: please see a demo of repro steps https://files.fm/u/eue9cq5t Could you please comment it, for what reason this style is important |
@DaveLomber Well, it was some time ago -- angular-ui/ui-scroll#138 (comment) -- I decided to switch this behaviour off for the purpose of compatibility through all the browsers. As you can get from MDN:
...but not in the virtual scrolling case if we are going to support also browsers that don't support scroll anchoring. The case where it takes an important part could be described as "compensation when scrolling top":
As I mentioned, the scroll anchoring feature is disabled for the compatibility purpose. This disabling is included in the viewport's styling sample in the Readme, but I agree that the form might not be clear enough, so perhaps it would be a good idea to add some explanation there. From the other hand maybe it will be better to handle anchoring case internally, but it might be not so easy... Anyway, that's just something to think about, but for now the restriction on the requirements level seems appropriate solution. |
Thanks @dhilt for the explanation for now the issue is resolved and I'm happy :) The only one suggestion I have - to give this style more attention in README, |
Hi there
I have implemented inverted data source to work with chat messages:
So far all is good when I scroll to top, to get older history
But then, when I returned to bottom and then scroll again to top - the
datasource.get
method started to calling so much timesThis effect can be seen on this video https://www.dropbox.com/s/wri4kt6fnf21s0g/ng-invertedd-scroll.mov?dl=0
I did many diff checks, but still not able to get the root cause.
If anybody has an idea - please share, will be much appreciated
The text was updated successfully, but these errors were encountered: