New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Demo page and touch functionality not working on mobile Android #239
Comments
Strangely enough, |
I couldn't get the demo page to work on Mobile web either. |
Sounds like a bug. Could you try and pinpoint the issue? |
Thanks for the prompt reply. All I did was to open the demo page (http://bevacqua.github.io/dragula/) on the mobile browsers (I tried chrome and safari) on my phone (6s, ios 9.0.2). None of the example works. |
I also thought my phone was broken. Then I tried another drag-n-drop plug in and it worked (http://rubaxa-sortable.meteor.com). Thanks! |
I've found three places that needed changing to get the current version to play nice on android: var ignore = whichMouseButton(e) !== 1 || e.metaKey || e.ctrlKey; changed to var ignore = (e.which !== 0 && e.which !== 1) || e.metaKey || e.ctrlKey; if (whichMouseButton(e) === 0) { changed to if (e.which !== 0 && e.which !== 1) { if (e.clientX === _moveX && e.clientY === _moveY) {
return;
} commented out (e.clientX is undefined, as is _moveX) //if (e.clientX === _moveX && e.clientY === _moveY) {
// return;
//} The alternate whichMouseButton logic I lifted from the react-dragula demo page. I have no idea if these changes work on iOS or what side-effects they may cause. Hope this helps. |
Note that that logic was used for fixes in https://github.com/bevacqua/dragula/blob/master/changelog.markdown#351-which-hunt |
Holy crap you guys are fast... |
Thank you!!! @MaxxWyndham and @bevacqua Is the Meteor package updated automatically as well? Or should I just try with a script link included in the header? |
@bevacqua Is there anything else I need to do? |
Hi there, I am looking for a drag and drop that works on both desktop and mobile and dragula looks great and seems to fit the bill. Are there any updates on when or if this fix will be included? |
Resolved in |
I was waiting for it. Thank you very much. @bevacqua |
Dragula seems like an excellent library, but I couldn't find anything on the documentation or previously opened issues for whether mobile Android was supported.
When I tried out the demo page, I wasn't able to use the drag and drop functionality. I tried long-pressing, pressing, scrolling, and pinching, but none of this worked.
Is there a flag I have to turn on, or is mobile Android not supported?
The text was updated successfully, but these errors were encountered: