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

Fixed click on drag and zoom issues #287

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bbreukelen
Copy link

  1. Resolved and issue where a drag event would result in a click event after dropping.
    Decision based on the the length of the tap/drag event and the distance moved.
  2. Dragging while zoomed in caused issues where the draggable showed at an incorrect position on the screen making it unusable.
    I applied the fix from Kocik's fork. Note that this only works if the container in which the draggable resides has a position: relative. Here is the fork: https://github.com/Kocik/jquery-ui-touch-punch-zoom-fork, thanks Kocik!

1. Resolved and issue where a drag event would result in a click event after dropping.
    Decision based on the the length of the tap/drag event and the distance moved.
2. Dragging while zoomed in caused issues where the draggable showed at an incorrect position on the screen making it unusable.
   I applied the fix from Kocik's fork. Note that this only works if the container in which the draggable resides has a position: relative.   Here is the fork: https://github.com/Kocik/jquery-ui-touch-punch-zoom-fork, thanks Kocik!
@tinnielam
Copy link

Recently I had a problem when I tried to click in a draggable.

Your fix actually worked, now I am able to click a button or someelement in a draggable div.

@RWAP
Copy link

RWAP commented Jan 29, 2019

The lines:

touch.clientX + $(window).scrollLeft(), // clientX + scrollLeft - fix for zoomed devices while dragging touch.clientY + $(window).scrollTop(), // clientY + scrollTop - fix for zoomed devices while dragging

Seem to prevent jQuery.ui sortable from allowing you to drop the item you move on Android and iphone machines...

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.

3 participants