Search code examples
javascriptjquerytouchinternet-explorer-10jquery-ui-touch-punch

Jquery touch punch works for Chrome and Firefox but not IE


I am using the jquery touch punch library to enable users to move images around via touch. This works fine in Chrome and Firefox but will not work in IE.

I find if I hold down on the image in IE a small square appears and I am able to drag the image within the boundaries of this square but no further. I guess this is the right click function kicking in.

I have looked around and most people are saying to add '-ms-touch-action: none' to the css of the draggable div. So I added that to the style attribute of the draggable div and it did nothing. I am still unable to drag in IE.

I've looked around for another alternative but am unable to find one. I have included jquery 1.8.1, jquery ui 1.8.23 and touch punch 0.2.2. Any help will be greatly appreciated.


Solution

  • I noticed the htm page I was launching containing the draggable div contained a meta tag which was emulating the page in IE9. 2 and a half days I spent on that! -ms-touch-action:none will definitely work in IE.

    If you have come here and are experiencing the same issue but the above paragraph didnt fix it for you, try this: In IE click the cog and go to Compatabilty View Settings and uncheck the box for Display intranet sites in Compatability View.