Smooth scroll issue
-
TLDR: with smooth scrolling enabled, a button linking from one subcontainer to another subcontainer in the same main container, instead scrolls to the top (but wrong) main container that has an anchor/id.
Spectra 2.10.3, WordPress 6.4.1. No other plugins that should affect this.
DETAILED:
My homepage consists of several containers (on the surface/top level). I’ll refer to these as “main containers”. In the top main container, there is a button linking to the second main container. Clicking that button makes the browser scroll to the second main container as expected.
Later on, I have another main container containing two subcontainers. In subcontainer1, I have a very similar button linking to subcontainer2. When I click it, however, the browser scrolls all the way up tot he second main container, so basically to the wrong anchor/id.
(This button is hidden on desktop. But just to make sure, I added a paragraph with no responsive conditions right next to the button, containing a link to the same subcontainer2.
The only way to resolve the issue I have found, is to disable smooth scroll to ID. (Customizer > global > misc) Which is far from ideal.
I have currently settled for another solution: the button in subcontainer1 links to the next top level container, which works fine. (But skips the subcontainer I wanted to link to.)
The page I need help with: [log in to see the link]
- The topic ‘Smooth scroll issue’ is closed to new replies.