Chrome console error: Unable to preventDefault inside passive event listener

#1

I see in Chrome console many Errors:
[Intervention] Unable to preventDefault inside passive event listener due to target being treated as passive. See https://www.chromestatus.com/features/5093566007214080

I use
lime 6.4.0
openfl 8.2.2.

to reproduce i use defualt BunnyMark sample
open Chrome in device mode
and drag mouse anywhere

0 Likes

#2

Is it occurring from this line?

This is designed to prevent default touchmove behaviors on mobile (so you can swipe within your content without scrolling the page).

If this is the cause, we’ll have to think about whether there is an alternative

0 Likes

#3

Yes, this line reason
I change it to this line (change “false” to “{passive : false}”)

window.addEventListener ("touchmove", function (event) { event.preventDefault (); }, {passive: false});

and no more errors in console

1 Like

#4

Thanks! I’ve committed this to both and Lime and OpenFL :success:

0 Likes

#5

Hi, I have a problem.
On my website, there is an error with the smooth scroll file. And it is observed in the google console. This happens every time you slide across the screen.
I have no knowledge in programming but my intuition tells me to get to a correct link.
Can somebody help me.
Thank you58

0 Likes

#6

Is this the library you are looking for?

EDIT

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

0 Likes