jQuery-slimScroll icon indicating copy to clipboard operation
jQuery-slimScroll copied to clipboard

Solution for "[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive."

Open Hydra9268 opened this issue 5 years ago • 1 comments

If anyone has encountered this issue, I've fixed it.

On line 329, replace

if (e.preventDefault && !releaseScroll) { e.preventDefault(); }

with

if (e.preventDefault && !releaseScroll) {  e.target.blur(); }

Remove line 330

if (!releaseScroll) { e.returnValue = false; }

Inside the else on line 350, add

document.onmousemove = function (e) { e.returnValue = false };

That will allow the script to correctly return a false value during the scroll wheel event. Hope that helps! :)

Hydra9268 avatar Dec 05 '19 01:12 Hydra9268

@Hydra9268 there's already an open issue for this topic, see here: https://github.com/rochal/jQuery-slimScroll/issues/316

rsimonton avatar Dec 16 '19 22:12 rsimonton