Open peterlunglum opened 7 years ago
//Before
window.scroll({
top: 2180,
behavior: 'smooth'
});
//After
skrollr.get().animateTo(2180);
As for the warning from Chrome: sorry for the trouble, this is a breaking change in Chrome 56 to improve scroll performance. There's probably a missing touch-action
CSS rule, which is necessary to support touch on IE/Edge anyway.
I'm trying to have an onclick event that takes a user to a position on the page with the skrollr library, but whenever I try to do so, I get the following error:
Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080 skrollr.min.js:2
As it is I am using the following javascript which I don't believe to be inhibiting the click behavior.