5

I am creating an application for windows using cordova that heavily relies on touch events such as touchstart and touchmove. These events work fine in the android and iOS version but they are not fired in the windows version. Instead the browser tries to scroll the page on touches (note: I am calling the event.preventDefault function on touchstart. but the event doesn't even fire).

In this case the edge browser has the same behaviour as the cordova app. In edge the is an option when u navigate to about:flags called enable touch events when this flag is set to Always on or Only on when a touchscreen is detected the application works perfectly. I was wondering if it is plausible to set this flag in the cordova application.

Web_Designer
  • 72,308
  • 93
  • 206
  • 262
  • I am facing the same problem. Did you find a solution? – gogol Feb 06 '17 at 15:25
  • Any news? I'm facing the same problem. As far as I can see, there is *no* event firing that could replace touchmove either. Without setting the flag I get *one* mousemove event (when using touch), but it's only called once when moving around, it's not very useful. – Tomnar Mar 02 '17 at 13:02

1 Answers1

0

2 years later, facing the same issue and found a solution by setting this in the CSS :

body { touch-action:none; }

I've also managed to make a jQuery slider inside an iframe in a Cordova App work correctly in tablet mode by using :

iframe { touch-action:none; }
EldenChris
  • 1,059
  • 1
  • 10
  • 16