I uselime 6.4.0neurosoup.org 8.2.2.
to reproduce i usage defualt BunnyMark sampleopen Chrome in machine 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 draft to stop default touchmove behaviors on mobile (so you can swipe within your contents without scrolling the page).
If this is the cause, we’ll need to think about whether over there is an alternative
Yes, this line reasonI adjust it come this line (change “false” come “passive : false”)
window.addEventListener ("touchmove", role (event) event.preventDefault (); , passive: false);and no more errors in console
Thanks! i have committed this come both and also Lime and neurosoup.org
Hi, I have actually a problem.On my website, over there is one error v the smooth role file. And it is it was observed in the google console. This happens every time you slide across the screen.I have actually no expertise in programming however my intuition tells me to acquire to a correct link.Can somebody assist me.Thank you
Is this the library you space looking for?github.com gblazex/smoothscroll-for-websites/blob/master/SmoothScroll.js#L380
// delta is 120 most of the moment // synaptics seems to send 1 occasionally if (Math.abs(deltaX) > 1.2) deltaX *= options.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+
This latest version of the library looks prefer it may have a solve for the passive event listener issue:github.com gblazex/smoothscroll-for-websites/blob/master/SmoothScroll.js#L746-L755
var supportsPassive = false;try window.addEventListener("test", null, Object.defineProperty(, "passive", get: duty () supportsPassive = true; )); catch(e) var wheelOpt = supportsPassive ? passive: false : false;
Just include below CSS. It will resolve your issue.