5

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

http://jsfiddle.net/qq2hjL2g/

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 pointermove 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 touch-action CSS specifies which touch actions are handled by the browser. This means setting touch-action to none 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.)

CookieEater
  • 2,237
  • 3
  • 29
  • 54
  • Thanks for your edits. This really saved me. In our app, for whatever reason, in IE11 the onmousemove was firing before onmousedown in our signature box, which blew everything up of course. Using that touch-action: none and then using onpointerdown and onpointermove worked. THANKS! – Atom999 Nov 13 '18 at 22:11

1 Answers1

1

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"

http://msdn.microsoft.com/en-us/library/windows/apps/hh465856.aspx

http://msdn.microsoft.com/en-US/library/ie/hh968249.aspx

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"

Impossibear
  • 195
  • 5