electron / website

:electron: The Electron website
https://electronjs.org
Apache License 2.0
117 stars 126 forks source link

Scrolling on the documentation website doesn't work. #176

Closed Someoneamzing closed 2 years ago

Someoneamzing commented 2 years ago

When scrolling on the documentation website, any attempt to scroll the page anymore than a few lines results in the page snapping back to the top. Not even manually dragging the scrollbar stops it.

It appears to be something related to the sticky navbar at the top, as the visual distance before it snaps back seems to be inline with the top of the page going past to top of the screen.

Someoneamzing commented 2 years ago

With a bit more fiddling, it seems to only affect the desktop breakpoint. Shrinking the browser window so the navbar and side panel collapse allows scrolling again.

erickzhao commented 2 years ago

@Someoneamzing I can't reproduce this locally on https://www.electronjs.org/docs/latest/. Can you share more information on your OS/web browser? A desktop recording showing a repro might help too.

Gerigot commented 2 years ago

I have the same Issue on Chrome Version 99.0.4844.51 on Ubuntu 21.10. I've tried on Firefox and it works without problems. I've found that if I remove the eventListener on document's scroll done by the useTOCHighlight (see the picture) it works on chrome but I've to remove it every time I change a page. image

I think the "problem" relays on docusaurus' version but, unfortunately, I can't update it and try because the newer version needs an algolia apiKey (https://docusaurus.io/blog/2021/11/21/algolia-docsearch-migration) so I can't check if an update would resolve it.

erickzhao commented 2 years ago

@Gerigot try forking this branch: https://github.com/electron/electronjs.org-new/pull/191

Currently blocked on the V3 migration due to some size limits that the V3 crawler infra has.

Gerigot commented 2 years ago

@Gerigot try forking this branch: #191

Currently blocked on the V3 migration due to some size limits that the V3 crawler infra has.

Sorry for the late reply I couldn't try before. I've seen that the forked branch mentioned in your comment has been merged to the main branch and now the scrolling is working also in "production" (website). I cannot reproduce the bug anymore.

molant commented 2 years ago

Going to close this issue then!

@Someoneamzing if you are still having this issue please let us know!