CreateJS / EaselJS

The Easel Javascript library provides a full, hierarchical display list, a core interaction model, and helper classes to make working with the HTML5 Canvas element much easier.
http://createjs.com/
MIT License
8.15k stars 1.97k forks source link

stage touch events no longer working under wkwebview engine (cordova) ? #755

Open dreammonkey opened 8 years ago

dreammonkey commented 8 years ago

I'm having the hardest time trying to get touch events working on my canvas inside wkwebview.

Is anyone else having this issue ?

lannymcnie commented 8 years ago

Have you initialized the Touch class?

createjs.Touch.enable(stage);
dreammonkey commented 8 years ago

hi @lannymcnie ,

Sorry for not being very descriptive, let me explain the issue:

I'm using Intel XDK (cordova) to bundle my html/canvas app into a native application. Everything works great in the browser and also when the app is packaged into apk / ipa apps, only when using the default UIWebView (ios that is). When I install the corodova plugin, WKWebView, the only thing that stops working (apart from cross origin XHR requests) are touch events on the canvas.

I initiate the touch class exactly as you described and I add the following listener to it (dummy code): stage.addEventListener("pressup", handelerMethod);

When using the exact same code in WKWebView the handler never fires.

In a desperate attempt to fix it I tried adding the the listener to the canvas using jquery, but that resulted in even more undesired behaviour, so I left it at that and uninstalled the plugin...

I don't feel like it's a bug in one of your libraries, but there must be some kind of funkiness going on when combined with WKWebView. I searched the net for answers, but empty handed I decided to post something here hoping somebody else has had the same experience...

Thram commented 8 years ago

Same problem here. Any news about this?