I have two pages Home (vertical scrolling) and About (horizontal scrolling), im trying to use smooth scrolling but im facing some issues.
If i navigate from Home to About, the horizontal scrolling stops working on About page. refreshing the About page, makes the horizontal scrolling working again.
So ive remade a minimal version to check what could be the issue, and i found that import "../assets/locomotive-scroll.css";
is the issue, ive tried multiple things, loading the css depending on route, lifecycles..
Replicate the issue
- Open project and preview in new tab (default preview seems that smooth scrolling is not working)
- Smooth scrolling on Emojis is working in Home
- Navigate to About by clicking on the "Go to About"
- Verify horizontal scrolling is not working (refreshing page makes it work again)
- Remove
import "../assets/locomotive-scroll.css";
- Smooth scrolling on Emojis stops working, but horizontal scroll on About is working
codesandbox.io link (open preview in new tab)