yurivyatkin / keiko-corp

The greatest startup ever created
https://keiko-corp-4f4963.netlify.com/
0 stars 0 forks source link

Scroll to section when clicking in the navigation links is not working #1

Closed yurivyatkin closed 6 years ago

yurivyatkin commented 6 years ago

It turned out that scrolling to the linked sections is not working only in Chrome, but is perfectly working in Firefox.

Googling brings: https://github.com/flesler/jquery.scrollTo/issues/164

Fixing this in Chrome by applying a "setTimeout" solution breaks from the above link scrolling in Firefox.

There is comment in the above link https://github.com/flesler/jquery.scrollTo/issues/164#issuecomment-337258257 - and thins one essentially is the solution.

Actually, I used this approach earlier, from https://css-tricks.com/snippets/jquery/smooth-scrolling/

Notice, that in Firerfox's console there is a warning:

This site appears to use a scroll-linked positioning effect. This may not work well with asynchronous panning; see https://developer.mozilla.org/docs/Mozilla/Performance/ScrollLinkedEffects for further details and to join the discussion on related tools and features!

See https://stackoverflow.com/questions/37098306/this-site-appears-to-use-a-scroll-linked-positioning-effect-this-may-not-work for the discussion.