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


#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


#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


#4

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