Open sunpasup opened 7 years ago
I'm having the same problem here, on Ionic Framework 2.
any one?? i am still looking for solution for above case.
i am using this ng2-dnd in my angular2 Project. it works fine in dekstop. i have this to work in Touch devices also. is there any way to do that.
Please Respond if there is any hacks
@sunpasup you can use https://github.com/timruffles/ios-html5-drag-drop-shim to emulate drag events on mobile devices
@Ledzz ios-html5-drag-drop-shim is useless, even its demo didn't work. How can You use it with ng2-dnd, can You provide any example?
@meltsas here's slightly modified code to run in typescript: https://gist.github.com/Ledzz/a688925e21014bc71711bfd7dc8ba24b
Then in OnIinit hook you can use it like this:
new DragDropShim({holdToDrag: 300}, document);
Code might not be ready for production!
@Ledzz I tried Chrome DevTool Touch Emulator (not with actual device) and it didn't work, but Thank You for trying to help. Maybe I am missing something but I thought the demo ( http://timruffles.github.io/ios-html5-drag-drop-shim/enter-leave/) suppose to work with touch device - instead of drag it scrolls (with Chrome devTool emulator) .
no support for devices
I tried out the [(http://timruffles.github.io/ios-html5-drag-drop-shim)], got the same result as @meltsas. Dragula seems to be working fine. +1
@Ledzz Tried in both ios and android. Not working. Are there any other options, rather than the http://timruffles.github.io/ios-html5-drag-drop-shim ?
@svcninja I tried Dragula on my Android. The drag and drop is working but the drag trigger the scrolling at the same time. Is it working fine for you?
Have the same with Dragula and Android srcolling issue. While drag, screen is moving/scrolling up and down and no way to drag item up and down.
@dragoplut Hi, I found a trick for this issue. Just add the following code in your CSS.
.yourDivName{ touch-action: none; }
@PierreDugue Thanks a lot. Your solution worked for me :-)
@PierreDugue Thanks a lot. It's works on Android but still doesn't works on iOS :(
EDIT: With this works on iOS too:
Install this on your project:
iOS shim for HTML 5 drag'n'drop
npm install --save drag-drop-webkit-mobile
Then in your polyfills file put:
var iosDragDropShim = require('drag-drop-webkit-mobile'); let options = { enableEnterLeave: true,holdToDrag: 300 }; iosDragDropShim(options);
It's works! :)
i am using this ng2-dnd in my angular2 Project. it works fine in dekstop. i have this to work in Touch devices also. is there any way to do that.
Please Respond if there is any hacks