You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This may be a Firefox bug or something somewhere in our JavaScript codebase is causing it to abort the scroll and instantly snap to the element being focused. This could be related to #11 which is a nasty anchor scroll bug in Chrome.
Details and clues:
Turning JavaScript completely off via dev tools makes it work totally fine, with smooth scroll both when clicking a table of contents link and during back/forward navigation.
If the target is already in the viewport when the link is clicked, smooth scrolling occurs as expected.
If the target isn't in the viewport, it snaps instantly without any smooth scrolling, but seems to stop when the element is in the centre of the screen rather than the element being at the top as it's expected to be.
Solutions
There's an open issue on Bugzilla for what sounds like this problem, so maybe we can just wait for Firefox to fix this, assuming this is the same issue.
Hotwire Turbo
Actually, upon further testing, it seems like this may very well be a bug only when Hotwire Turbo is in use. There's an open issue with a lot of details and potential but hacky workarounds.
Probably won't use, doesn't quite work and it's re-implementing browser
behaviours - which is a code smell - and it seems like it's actually
probably an issue with Hotwire Turbo.
This may be a Firefox bug or something somewhere in our JavaScript codebase is causing it to abort the scroll and instantly snap to the element being focused. This could be related to #11 which is a nasty anchor scroll bug in Chrome.
Details and clues:
Solutions
There's an open issue on Bugzilla for what sounds like this problem, so maybe we can just wait for Firefox to fix this, assuming this is the same issue.
Hotwire Turbo
Actually, upon further testing, it seems like this may very well be a bug only when Hotwire Turbo is in use. There's an open issue with a lot of details and potential but hacky workarounds.
Links
The text was updated successfully, but these errors were encountered: