Skip to content
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

Merged
merged 1 commit into from
Jul 18, 2015
Merged

Allow click events for touch devices #411

merged 1 commit into from
Jul 18, 2015

Conversation

ajwild
Copy link
Contributor

@ajwild ajwild commented Jun 3, 2015

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.

@ghost
Copy link

ghost commented Jun 4, 2015

Thanks for pointing the issue with #406, @ajwild. It's fixed in #412.

@ajwild ajwild force-pushed the dev branch 3 times, most recently from ff05608 to 85d666c Compare June 4, 2015 16:03
@ajwild
Copy link
Contributor Author

ajwild commented Jun 4, 2015

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.

@ajwild ajwild force-pushed the dev branch 3 times, most recently from 62d469d to 9940598 Compare June 11, 2015 16:28
@ajwild
Copy link
Contributor Author

ajwild commented Jun 11, 2015

I've given this more of a test and created some JS Bin examples:
AngularJS
JavaScript

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.

@denyss86study
Copy link

I have the same issue. Buttons are not clickable when using Sortable on mobile. I think this should be marked as a BUG.

@denyss86study
Copy link

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.

@denyss86study
Copy link

I found the following pull request that fixed all issues on both Android and iPhone and also allows to click on items: #441

RubaXa added a commit that referenced this pull request Jul 18, 2015
Allow click events for touch devices
@RubaXa RubaXa merged commit 5509a9f into SortableJS:dev Jul 18, 2015
RubaXa added a commit that referenced this pull request Jul 18, 2015
RubaXa added a commit that referenced this pull request Sep 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants