Scrolling Nav effect does not work in Google Chrome

Asked

Viewed 304 times

-3

The effect Scrolling Navof my website is not working in Google Chrome, but in Firefox, Edge, Safari and etc, is working normal, which may be?

1 answer

1

This was due to a change in Chrome 61, as per Blog (15 August 2017):

To align with the spec and preserve browser Consistency, the scrollingElement is now the documentElement in standards mode.


Details about the standards mode: https://dev.opera.com/articles/fixing-the-scrolltop-bug/

Note: I found the information thanks to a post on Autoscroll on chat exchange doesn’t work in Chrome 61

A possible way to fix is to change the element that will receive the scroll to this:

var el = document.scrollingElement || document.documentElement;

Documentation: https://developer.mozilla.org/en-US/docs/Web/API/document/scrollingElement

Note: if you’re using jQuery update it to the latest version, you’ve probably fixed the bug in it.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.