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

When chrome smooth scrolling flag is enabled, the scrollToItem api is not working as expected. #388

Closed
twoKilo opened this issue Jan 26, 2022 · 14 comments
Labels
invalid This doesn't seem right

Comments

@twoKilo
Copy link

twoKilo commented Jan 26, 2022

Bug Report

Describe the Bug

When chrome smooth scrolling flag is enabled, the scrollToItem api is not working as expected.

How to Reproduce

  1. chrome://flags/#smooth-scrolling (ONLY: Windows, Linux, Chrome OS, Android)
  2. toggle smooth-scrolling into Enabled
  3. scrollToItem is not working

CodeSandbox Link

Expected Behavior

scrollToItem is working and the success callback should be invoked.

Screenshots

Add screenshots to help explain your problem.

Your Environment

  • Device: PC
  • OS: Windows
  • Browser: Chrome
  • Version: 0.5.5

Additional Information

This bug can only be reproduced on Windows. I've already ship this package into production env, please help me with this issue.
Thanks.

@wellyshen
Copy link
Owner

wellyshen commented Jan 26, 2022

@twoKilo Can you show me the reproduced video? BTW, if you set the smooth of the scrollToItem to false. Does it work as expected?

@twoKilo
Copy link
Author

twoKilo commented Jan 27, 2022

@twoKilo Can you show me the reproduced video? BTW, if you set the smooth of the scrollToItem to false. Does it work as expected?

After setting option smooth into false, it is still not working.

here is the reproduced video

you can see that it's not scrolled to the latest message and can only scroll the list by dragging the scrollbar.

here is the normal behavior

Let me know if you've seen the GIF, I need to delete it...

ps: can we speak Chinese,pls?

@wellyshen
Copy link
Owner

wellyshen commented Jan 27, 2022

@twoKilo

Sorry, I don't have Windows OS in my Macbook Pro, so I need your help with debugging. Is there any error on the console tab of your Google Dev Tools? Does the scrollto and the startitem work?

You can delete the GIFs.

I think we'd better use English for the issue because this issue might help others someday.

@twoKilo
Copy link
Author

twoKilo commented Jan 30, 2022

@wellyshen
No, there is no error either on the console or Dev tool. I will test the functionality of scrollTo later, but I can't use startItem cause I am using version 0.5.5, and upgrading a package in my company takes some efforts... But do let me know if you want it to be verified.

Also, I've received a feedback from test team that the auto scroll feature is not working on Sogou browser(speed version) which is achieved by using scrollToItem api. And I've tried the scrollTo, it's working as expected on Sogou browser.

Currently I am also on MacOS, I'll get back to you with a reproducing demo on Sogou browser as soon as I can.

Debugging can wait ; )

@wellyshen
Copy link
Owner

wellyshen commented Jan 30, 2022

@twoKilo Can you upgrade to the latest version then test these methods locally? I think we can focus on Google Chrome first because Sogou is based on Chromium.

@twoKilo
Copy link
Author

twoKilo commented Jan 31, 2022

@wellyshen I've upgraded to the 0.6.0 version, and tested on Windows (smooth scroll enabled), and scrollToItem is still not working.

I think Sogou does not share the same issue with Chrome on Windows(smooth scroll enabled). But okay, we can focus on the topic issue first. Still I hope you can look into Sogou issue anyway.

Appreciated.

@wellyshen
Copy link
Owner

wellyshen commented Jan 31, 2022

@twoKilo How about the startItem and scrollTo do them work? BTW, the latest version is v0.7.0.

@twoKilo
Copy link
Author

twoKilo commented Feb 9, 2022

@wellyshen I've updated to v0.7.0, and tested on Windows (smooth scroll enabled), scrollToItem and startItem both not working. scrollTo is working as expected.

@wellyshen
Copy link
Owner

wellyshen commented Feb 9, 2022

@twoKilo Have you enabled the smooth: true when trying the scrollToItem and scrollTo methods?

@wellyshen wellyshen added help wanted Extra attention is needed question Further information is requested labels Feb 10, 2022
@wellyshen
Copy link
Owner

@twoKilo I have gotten a Windows laptop, will investigate this issue soon.

@wellyshen wellyshen assigned wellyshen and unassigned wellyshen Feb 20, 2022
@wellyshen wellyshen removed the question Further information is requested label Feb 26, 2022
@wellyshen
Copy link
Owner

@twoKilo Sorry I'm busying recently. Will investigate this issue once I have time.

@wellyshen
Copy link
Owner

@twoKilo Hey mate, sorry for the late response. I tried to reproduce this issue on Windows 11 + Chrome + smooth scrolling enabled, but I can't reproduce it. Did I miss something?

scroll-to-item.mov

@wellyshen wellyshen assigned wellyshen and twoKilo and unassigned wellyshen Apr 24, 2022
@wellyshen wellyshen added question Further information is requested and removed help wanted Extra attention is needed labels Apr 24, 2022
@wellyshen wellyshen added invalid This doesn't seem right and removed question Further information is requested labels Apr 26, 2022
@wellyshen
Copy link
Owner

@twoKilo Feel free to re-open it if you still encounter this problem.

@romadryud
Copy link

@wellyshen Idk if it the same, but I faced issue when scrollBehavior: "smooth" set to outer and if you have "light" data it will start lagging about on 300th element, but in work i have heavy one and I faced it from start. There example forked from RCV examples. Of course there are no issue when we delete scrollBehavior: "smooth" from outer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants