"Unable to preventDefault inside passive event listener invocation." only since 1.54.0

I’m using Chrome Dev tools to emulate a touch screen device. As of engine 1.54.0, this error is now present when using touch event listeners. If I downgrade to 1.53.4, there is no error.

You can reliably recreate this with the Basic Touch Input tutorial project.

I suspect this commit is the culprit. It seems as though marking the event listeners as passive to avoid a console message has inadvertently caused this console error.

For reference, I’m using Chrome 102.0.5005.61 on macOS Monterey 12.4.

We are looking to revert and release a new patch version 1.54.0 gives "Unable to preventDefault inside passive event listener invocation." for touch events · Issue #4329 · playcanvas/engine · GitHub

1 Like