-
-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Cancel list scroll reset after mouse move on wheel scroll #9233
Cancel list scroll reset after mouse move on wheel scroll #9233
Conversation
I think this should fix #9217 - looked like the main issue was that I missed wheel scrolling as a source of intentional scrolling. |
46bfd84
to
af1faa2
Compare
Edit: I felt it improved as I restarted the browser. I'm sorry. I seems that there is no problem with the Safari for mac (12.0.1) and the Chrome for mac (70.0.3538.77). As for Windows, I can not test it until I return from work... sorry. I will try it in another environment after I return from work. |
I wonder if these things need to be in state if they are never rendered. Using simple variables might work better and improve performance. |
I tried this on the Chrome for Windows (70.0.3538.77) and the Firefox for Windows (63.0.1). |
What's the extent of this issue if you are manually scrolling with page up/down, the scrollbar, or arrow keys? (Because the fix seems to depend on the wheel event specifically) |
af1faa2
to
9b8c1e7
Compare
I'd put them in state because I figured I'd add some visual indication of the pause, but then figured it wasn't particularly necessary. That can always be changed later, though, so I just amended the commit to move these into plain object properties. That simplifies the logic as a bonus. |
- Use object properties rather than component state for mouseMovedRecently and scrollToTopOnMouseIdle flags - Remove redundant scrollToTop prop call, also fixing an attempt to call an undefined prop. Fixes mastodon#9217
9b8c1e7
to
68b3112
Compare
And one more tweak, as I just realized my call to |
Also fixes an error introduced in #9200 caused by attempting to use an
undefined prop.
Fixes #9217