docubuzz / touch-sortable.js

A tiny, animated, sortable plugin for jQuery, supporting both touch and mouse events.
http://docubuzz.github.io/touch-sortable.js
Other
7 stars 1 forks source link

IE compatibility #3

Closed andreu86 closed 11 years ago

andreu86 commented 11 years ago

I tried it in IE8 and it doesn't work. Is there any plan to include IE8 compatibility? Anything I could do?

Thanks in advance

andreu86 commented 11 years ago

Why are you using e.originalEvent instead of the event received? in IE8 the original event doesn't have properties, so calculations and this kind of things doesn't work. Changing this and replacing

e.preventDefault;

by

e.preventDefault ? e.preventDefault() : e.returnValue = false;
ashishpuliyel commented 11 years ago

We've only tested it against IE9+, where it works. IE8 and older versions together account for 6% of the browser share, and with limited resources, we made a decision not to include support for it. If you can patch in support for IE<9 we'd be happy to consider including it.

We use the original event because the jquery event doesn't include event.touches which we need to support touch events. The event in IE absolutely does have properties, just different ones. Working from memory, if you replace event.pageY with event.clientY it may work in IE too. But I think there are some bugs with positioning.