KineticJS icon indicating copy to clipboard operation
KineticJS copied to clipboard

Windows 8/IE10 drag and drop

Open jrm213 opened this issue 13 years ago • 3 comments

Hi,

I wrote some tools that use the drag and drop feature, they have worked so far on all devices, but recently we received reports of issues on the Lenovo Twist (Windows 8) when it is in tablet mode. I confirmed, drag doesn't work when in tablet mode but it does work when in laptop mode.

When in tablet mode, when you go to drag the items the get a square around them (or on them if they are bigger than the square it draws) and you can only drag to an area within that little square.

You can view this issue on the HTML5 Canvas Drag and Drop Tutorial on a Windows 8 Tablet using IE10, it works on windows 8 tablet with Firefox 20.

jrm213 avatar Apr 11 '13 16:04 jrm213

I guess the problem is how IE threats touch event, maybe if you use javascript ignore default behavior. on jquery

event.preventDefault()

not sure how to in raw javascript.

Elmapul avatar Oct 15 '13 22:10 Elmapul

In IE10/11, you need to tell the browser that you will be handling touch events for a container (else, it will try to interpret touch as an action for the browser to perform, like panning or zooming, etc).

If you want to try it out, edit the Drag/Drop tutorial that you referenced to add a style to the container div (did you know that the code in those tutorials are in a live editor?):

<div id="container" style="-ms-touch-action: none;"></div>

Reference: http://msdn.microsoft.com/en-us/library/ie/hh772044(v=vs.85).aspx

jfollas avatar Oct 15 '13 23:10 jfollas

I can confirm '-ms-touch-action: none;' enables drag & drop as one would expect. This issue should probably be closed.

kurtschindler avatar Jan 04 '14 21:01 kurtschindler