CookieMonster CookieMonster - 1 year ago 85
Javascript Question

Pointermove does not fire for touch on IE

I want to listen to

event on IE11, but it seems that
only fires for mouse (and possibly pen), but not when you are using your finger.

Actually, the specification says that it fires for pens/mice, so this may not be really a bug.

But, is there any way to listen to pointermove on IE for touch? There must be, but I was very surprised to see
not firing at all.

EDIT: I found that if I put CSS
touch-action: none
on the div, pointermove events fire. But why? I'm trying to find documents related to this, but I couldn't find any so far.

EDIT: I learend that the
CSS specifies which touch actions are handled by the browser. This means setting
tells the browser to not handle any touch events, and the developer is responsible for controlling the behaviour throutgh JavaScript events. This is why I was getting the events fired properly only when I had the CSS. (See more at MDN.)

Answer Source

I'm also trying to interface with IE11 touch. I believe MSGesture is used for touch events because in their documentation they refer to "fingers"

I believe the gestures you are interested in are: MSGestureStart - "Triggered when the screen is touched on a location over this element."

MSGestureChange - "Triggered when the finger positions associated with the interaction moves on the screen."

MSGestureEnd - "This event fires when all associated contacts are removed from the surface"

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download