1

I am trying to get touch (and digitizer) events to work in IE and Edge. However, these browsers always send the touch events to the browser UI instead of the dom element. I tried to prevent this with the usual

event.returnValue = false;

but with no success.

Here is a pen where one should be able to draw with touch on a SVG canvas but it only works with Firefox and Chrome.

https://codepen.io/anon/pen/qYwWyJ

It can be checked that it works otherwise properly with IE and Edge by replacing 'touchmove' with 'mousemove' and removing '.changedTouches[0]'.

Interestingly, other pages have the same problems, for example,

I hope I am not out of luck but this must be working somehow with at least Edge I hope.

Edit

I found a similar question (not a duplicate because it deals with different events) here:

However, the suggested solution does work neither in the case it is suggested for nor in my case.

Daniel
  • 3,383
  • 4
  • 30
  • 61
  • I just found a workaround (solution?): Using `touch-action: none;`, as suggested at https://stackoverflow.com/a/49305956/1981832, on the svg element and using `mousemove` instead of `touchmove`, as explained in my question, seems to do the trick in IE and Edge. Here is a pen that works in both: https://codepen.io/anon/pen/jxREwR. – Daniel May 22 '18 at 18:29

0 Answers0