I uselime 6.4.0neurosoup.org 8.2.2.

to recreate i use defualt BunnyMark sampleopen Chrome in gadget modeand drag computer mouse anywhere


You are watching: Unable to preventdefault inside passive event listener due to target being treated as passive

*

Is it arising from this line?

github.com neurosoup.org/neurosoup.org/blob/develop/assets/templates/html5/template/index.html#L20

::if favicons::::foreach (favicons)::::end::::end::::if linkedLibraries::::foreach (linkedLibraries)::::end::::end::html,body margin: 0; padding: 0; height: 100%; overflow: hidden; #neurosoup.org-content background: #000000; width: ::if (WIN_RESIZABLE)::100%::elseif (WIN_WIDTH > 0)::::WIN_WIDTH::px::else::100%::end::; height: ::if (WIN_RESIZABLE)::100%::elseif (WIN_WIDTH > 0)::::WIN_HEIGHT::px::else::100%::end::; ::foreach assets::::if (type == "font")::::if (cssFontFace)::::cssFontFace::::else::
This is designed to prevent default touchmove actions on mobile (so you deserve to swipe within your content without scrolling the page).

If this is the reason, we’ll have to think around whether tbelow is an alternative


Yes, this line reasonI change it to this line (adjust “false” to “passive : false”)

home window.addEventListener ("touchmove", attribute (event) occasion.preventDefault (); , passive: false);and no more errors in console


Thanks! I’ve committed this to both and Lime and also neurosoup.org

*


Hi, I have a problem.On my webwebsite, tright here is an error via the smooth scroll file. And it is oboffered in the google console. This happens eextremely time you slide throughout the screen.I have actually no understanding in programming yet my intuition tells me to acquire to a correct link.Can somebody help me.Thank you

*


Is this the library you are looking for?

github.com gblazex/smoothscroll-for-websites/blob/master/SmoothScroll.js#L380

// delta is 120 the majority of of the moment // synaptics appears to sfinish 1 sometimes if (Math.abs(deltaX) > 1.2) deltaX *= alternatives.stepSize / 120; if (Math.abs(deltaY) > 1.2) deltaY *= options.stepSize / 120; scrollArray(overflowing, deltaX, deltaY); event.preventDefault(); scheduleClearCache();}/** * Keydown event handler. *


See more: Lamar Odom Flees Hospital With Charlie Sheen Lamar Odom : 2,000+

EDIT

This latest version of the library looks choose it may have a settle for the passive event listener issue:

github.com gblazex/smoothscroll-for-websites/blob/master/SmoothScroll.js#L746-L755

var supportsPassive = false;attempt home window.addEventListener("test", null, Object.defineProperty(, "passive", get: attribute () supportsPassive = true; )); catch(e) var wheelOpt = supportsPassive ? passive: false : false;

Just Add listed below CSS. it will fix your worry.