Warning: non-passive event listener to a scroll-blocking 'mousewheel' event
[Violation] Added non-passive event listener to a scroll-blocking 'mousewheel' event. Consider marking event handler as 'passive' to make the page more responsive.
Any solution for this so far @janat08 ? Running into the same issue with React 16.3. Initializing ScrollMagic in componentDidMount() (which was worked thus far).
no
I was able to fix this using the guide here to check if passive is supported and then add the passive flag to each addEventListener in ScrollMagic.js as shown in their example, i.e.
window.addEventListener("mousewheel", function () {}, passiveSupported ? { passive: true } : false);
@melpers This would be such an easy performance fix, could you create a pull request?
@melpers Would you be able to post a link to the new SM file you use that incorporates passive event listeners?
I can't post a link as the site that was using it was taken down and the repo is private. However, I dug up a copy of it and am attaching it here. YMMV. ScrollMagic_passive_patched.js.zip