This project is archived and is in readonly mode.
iPhone/iPad Draggable & Sortables
Drag/Drop functionality on iPad/iPhone works a bit differently than most other browsers making Draggable and Sortables unusable on that platform.
library for iPad/iPhone can be found at:
I just personally tested it on an iPad and it does work :)
Would it be possible to make Draggable & Sortable truly cross platform by integrating the functionality into mootools.more?
Comments and changes to this ticket
- State changed from new to wontfix
I don't think this makes a lot of sense for our current implementations in More. Especially because I would use the translate property instead of dimensions. Maybe its a good idea for a later version of More (2.0) or a third party implementation :)
So if I wanted to be the 3rd party that develops this add-on (I'd be happy to share my outcome for inclusion in "more" if I get it working) would you be able to give me a few ideas of the approach you'd use to hack the "webkit_draggable" functionality into mootools Draggable?
I have used mootools to program my own web apps for several years now, but I am not too familiar with the innards of mootools and a couple of hints where to start and what would be the most sensible approach could save me many hours of work on this...
On webkit based browsers this is pretty easy. You can leverage the pageX and pageY variables of the first touch on touchstart and touchmove to calculate a delta, set the position with translate(3d) and get the droppable container via document.elementFromPoint. In addition you can set pointer-events: none on CSS elements to make elementFromPoint fall through. This kind of stuff greatly diverges from anything we do now and is, in my opinion, the less hacky way. What we have now is kind of a hack.
I am not too familiar with the native HTML5 drag events. You may wanna look into that. Given that the implementations are weird and buggy I would probably go for just using the touch events.
Any updates on this matter? In my opinion the lack of support of drag on touchscreen devices is not missing feature but a bug. Of MooTools is truly supposed to be crossplatform this should be fixed.
Not to be an ungrateful guy (I love MooTools), but this is how I see it.
There's no plan at this time to add support for mobile browsers. Currently mootools is only developed/tested against these (as stated on mootools.net):
MooTools is compatible and fully tested with Safari 3+, Internet Explorer 6+, Firefox 2+ (and browsers based on gecko), Opera 9+, and Chrome 4+.
As christoph pointed out -- we would be happy to take a look at 3rd party contributions -- but don't have the time/resources to write this sort of thing ourselves.
[edit: -er from christoph]