slip icon indicating copy to clipboard operation
slip copied to clipboard

Slip doesn't work in IE9

Open aarfing opened this issue 10 years ago • 3 comments

Hey pornel,

Just did a drag and drop test in IE9 and it doesn't work.

You're not able to drag an item - and it shows no erros in the console. I think it either should work in IE9 or it should be feature-detectable, so a proper fallback can be used.

Also -ms-user-select: none; should be added to your demo for improved IE support :)

aarfing avatar Nov 26 '14 12:11 aarfing

Thanks for checking it. Could you investigate what is failing? Does it fire mouse events?

kornelski avatar Nov 26 '14 13:11 kornelski

Ok, so I did some investigating and made it work. The problem is that while IE9 understands 'transform' as a CSS property, in JavaScript it needs the 'ms'-prefix like so: 'msTransform', so a simple test for that makes it work.

aarfing avatar Nov 27 '14 20:11 aarfing

Actually IE9 needs a prefix on the CSS property as well, so a simple verbose proof of concept would be:

var transformPrefix = "webkitTransform" in testElement.style ? "webkitTransform" : "transform"; if(transformPrefix === "transform"){ transformPrefix = "msTransform" in testElement.style ? "msTransform" : "transform"; } var transformProperty = transformPrefix === "webkitTransform" ? "-webkit-transform" : "transform"; if(transformProperty === "transform"){ transformProperty = transformPrefix === "msTransform" ? "-ms-transform" : "transform"; }

aarfing avatar Nov 27 '14 21:11 aarfing