motion
motion copied to clipboard
scrollYProgress is not accurate when using with window.scrollTo
Describe the bug
scrollYProgress is not accurate when call window.scrollTo
CodeSandbox
Steps to reproduce
Steps to reproduce the behavior:
- Go to CodeSandbox
- Open the console to see the log
- Click on the button
- Scroll down to '....'
- See error
Expected behavior
For example, if I call window.scrollTo(0,window.document.body.scrollHeight/2) then scrollYProgress should be 0.5