raingart / Nova-YouTube-extension

Apache License 2.0
213 stars 11 forks source link

[Bug] Header unfixed causes scroll to top #53

Closed robertgarciakof closed 1 year ago

robertgarciakof commented 1 year ago

With only the Header unfixed option enabled, I open a video and wait a few seconds for the page to load, then I press Av Pag on the keyboard or roll the mouse wheel down to quickly scroll down to the comments section and the problem is that the screen automatically scroll to the top of the page at the time it should show the comments

raingart commented 1 year ago

It's not exactly a bug. This is a feature of the "Scroll after header" function It is launched after the auto-scroll trigger fires inside YouTube itself. It is not initially designed for the fact that the Header will not be fixed. These are fixes over fixing youtube itself. I added a check in the beta that if the Header is in the viewport, then only the activation. Perhaps this will help.

Screenshot from 2023-02-09 15-24-50

robertgarciakof commented 1 year ago

Good, what you've changed fixed that behavior.

About your comment, I had already noticed before that on YouTube without Nova it also happened but only if you just open the video and then scroll down to the comments without waiting for the page to load, but I published it as a bug because with Nova it happens in all cases (with the page already loaded or with the page loading)