H
H
HellWalk2017-11-10 15:06:05
Python
HellWalk, 2017-11-10 15:06:05

Why does SmoothScroll.js work crookedly?

The site has SmoothScroll.js for smooth scrolling to the desired anchor, but there is a strange bug in its work - the first time you click on the anchor, there is a transition to the anchor + about 100px of offset is added down. But if you click on the same link again, the screen will move higher (as if those added 100px are removed).
Page
The first time you click on "Example from practice" the page occupies the following position:
60f8bcf26d7d2cd34786313d34e4616e-full.pn
When you click on the same menu item again, this position:
517e2a46cd9917024930f64af2c2e6f1-full.pn
Settings in SmoothScroll.js itself twisted, but did not find anything related to the page offset.
In what cases the scroll works fine:
- if you remove all js-files from the page
- if you remove the top menu from the layout

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question