motion icon indicating copy to clipboard operation
motion copied to clipboard

scrollYProgress is not accurate when using with window.scrollTo

Open khuongtp opened this issue 6 months ago • 0 comments

Describe the bug

scrollYProgress is not accurate when call window.scrollTo

CodeSandbox

here

Steps to reproduce

Steps to reproduce the behavior:

  1. Go to CodeSandbox
  2. Open the console to see the log
  3. Click on the button
  4. Scroll down to '....'
  5. See error

Expected behavior

For example, if I call window.scrollTo(0,window.document.body.scrollHeight/2) then scrollYProgress should be 0.5

khuongtp avatar Jul 30 '24 02:07 khuongtp