-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Allow click events for touch devices #411
Conversation
ff05608
to
85d666c
Compare
Using touchmove instead of touchstart constantly updated oldIndex, so oldIndex always equaled newIndex when the element was dropped. Instead of using the fix from #250 I've added a new move variable instead which is set on touchmove or dragover, then preventDefault is only used when an element was dragged. |
62d469d
to
9940598
Compare
I've given this more of a test and created some JS Bin examples: I've also found that there is a bug (in master) with IE9 click events not firing. I've found a way to fix it but I'm not sure what impact it will have on other browsers. See commit ajwild@0810489. IE9 demos for AngularJS and JavaScript. |
I have the same issue. Buttons are not clickable when using Sortable on mobile. I think this should be marked as a BUG. |
Commit 9940598 by ajwild is not working. It fixed issues with Android devices and I can click on items, however iPhone (which worked previously) is not working anymore... So, it's not a good workaround. |
I found the following pull request that fixed all issues on both Android and iPhone and also allows to click on items: #441 |
Allow click events for touch devices
This addresses issue #250 with the fix mentioned by @kirilgorbachov.
I've tested with Chrome and Firefox on Mac and Android and it fixed the issue without causing any problems.
P.S. Pull request #406 has caused a jshint error.