I'm using the Konva.js@1.3.0 library (with React@15.4.2 and react-konva
) to build a simple 2D game.
When testing the app in Chrome all is well. However, when I open Dev Tools and switch to the Device Toolbar (to view the app on mobile-sized viewports) I get an warning of:
Unable to preventDefault inside passive event listener due to target being treated as passive.
See https://www.chromestatus.com/features/5093566007214080
I've read through the link and researched the {passive: true}
option for AddEventListener
. However, I'm not directly calling AddEventListener
in my code, it's all abstracted through Konva and React.
Also, none of the click events attached to the Konva-generated canvas elements are working in Device Mode. If I exit the Device Toolbar everything works fine and clicking elements functions as intended.
How can I enable passive event listeners in Konva/React? (And is that even the solution?)