gblazex/smoothscroll-for-websites

Smoothscroll seems to have stopped working in the latest version of Chrome [73]

pauljohnknight opened this issue · 17 comments

Hi

In the latest version of Chrome [73.0.3683.75] the smooth scroll seems to have stopped working (and looks very jumpy). It's throwing an error in the console:

Unable to preventDefault inside passive event listener due to target being treated as passive

In the console error message it links to this page to on the Chrome Platform Status:

https://www.chromestatus.com/features/6662647093133312

I've encountered this issue as well on the latest Chrome. It seems Chrome are ignoring passive mouse-wheel event listeners on the window object going forward. This will break a lot of mouse-wheel related plugins.

Looking at the docs for this change it looks like you need to change the wheel event object boolean from true to false:

// this is now the default
window.addEventListener("wheel", func, {passive: true} );

//which needs to be changed to:

window.addEventListener("wheel", func, {passive: false} );

Explanation is given in the link below. I can't seem to work out where this will go in the code though?

The link the below can also be found on the page I've linked to in my original post on this thread

https://github.com/sahel-sh/Document-level-passive-wheel-event-listeners/blob/master/Explainer.md

From what I can gather looking at the docs you can (effectively) turn this update off with some javascript. The problem is by the look of it @gblazex has his notifications turned off, so he probably won't see this issue for possibly weeks.

This issue is already fixed boys.

Breathe easy

Why have you closed this issue when it hasn't been fixed @gblazex? Are you running the latest version of Chrome?

Hi @gblazex - What @pauljohnknight says - it defo isn't working with the latest version of Chrome. I understand Elegant Themes have removed it from the latest Divi as well for the same reason.

...also I do appreciate you taking the time to write this and try and fix it. I didn't mean that last comment to sound off in any way. But it definitely still isn't working (have tried the cdn code and non minified code in the repository).

Ah yes all good and working now - must have been a caching issue. You're a legend thanks @gblazex @emilyChewsCheese - would recommend clearing your entire browser history instead of doing a hard-refersh.

@gblazex has this been pushed to cdnjs yet? I only see the v1.4.8 and that has that error still.

https://cdnjs.com/libraries/smoothscroll

also updated npm which i forgot. maybe this will solve cdnjs too

Thanks but it's still in v1.4.8. Can you contact cdnjs and find out why? I messaged them but I think they didn't respond as I am not the author of the library.

i think it is updated :)

Thank you. It's all good now.

💗