inuyaksa / jquery.nicescroll

nicescroll plugin for jquery - scrollbars like iphone/ipad
https://nicescroll.areaaperta.com/
3.6k stars 1.67k forks source link

ERROR: [Intervention] Unable to preventDefault .......... #825

Open zdimaz opened 3 years ago

zdimaz commented 3 years ago

jquery.nicescroll.min.js?ver=1:2 [Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/6662647093133312

Shaveyy commented 3 years ago

This pull request resolves the issue https://github.com/inuyaksa/jquery.nicescroll/pull/802

zdimaz commented 3 years ago

[Chrome] Unable to preventDefault inside passive event listener due to target being treated as passive.

Bugs not fix (((( CRY CRY CRY ( Help bro pls

andreweberle commented 3 years ago

@zdimaz This is a bit hacky however if you got to line 2903 in jquery.nicescroll.js you can comment out the error line.

`var chk = doScrollRelative(px, py, chkscroll, true);

        if (chk) {
            if (chkscroll) hasparentscrollingphase = true;
        } else {
            hasparentscrollingphase = false;
            e.stopImmediatePropagation();
            //e.preventDefault()
            return;
        }`
nftstudio commented 3 years ago

You Can search Code: (passiveSupported && active) ? el.addEventListener(name, fn, { passive: false, capture: bubble }) : el.addEventListener(name, fn, bubble || false); Then Changed it: (passiveSupported && (active || el == window.document || el == window.document.body || el == window)) ? el.addEventListener(name, fn, { passive: false, capture: bubble }) : el.addEventListener(name, fn, bubble || false);

And Enjoy !

kidzen commented 3 years ago

npm i tolc/jquery.nicescroll#master

install it from specific repository temporarily did the trick

enzedonline commented 2 years ago

Using the min.js, it's coming from b>k - comment out the last two lines of that:

          z(r, i, t, !0)
            // ? void (t && (q = !0))
            // : ((q = !1), e.stopImmediatePropagation(), e.preventDefault())
            )
dopeabeam2 commented 2 years ago

Using the min.js, it's coming from b>k - comment out the last two lines of that:

          z(r, i, t, !0)
            // ? void (t && (q = !0))
            // : ((q = !1), e.stopImmediatePropagation(), e.preventDefault())
            )

Please fix my issues am getting those. seeing errors on http://dopenews.in You can check i tried to use 3.7.6 version but i cant reload by site cant even scroll wih this version so am using 3.5.1 version but there is an error please check that