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

drag does not work with touchmove default prevented #114

Open
wclr opened this issue Jul 24, 2015 · 6 comments
Open

drag does not work with touchmove default prevented #114

wclr opened this issue Jul 24, 2015 · 6 comments

Comments

@wclr
Copy link

wclr commented Jul 24, 2015

On touch (mobile) devices.

There is a popular libriry for cross browser scrolling iScroll https://github.com/cubiq/iscroll/, jquerypp drag events do not work properly when dragable element placed on it.

@mickmcgrath13
Copy link
Contributor

@whitecolor Could you give more context to the issue you're experiencing (iScroll options you've set, etc)?

I've created a jsbin, and jQuery++ / iScroll are behaving as expected: http://jsbin.com/nerari/edit?html,js,output

@wclr
Copy link
Author

wclr commented Jul 31, 2015

@mickmcgrath13 sorry I forgot to mention that it doesn't work on touch devices, its ok on destop right.
http://jsbin.com/lilehonoto/edit?html,js,output

@mickmcgrath13
Copy link
Contributor

@whitecolor I ran the following bin's output on my mobile device, and it worked as expected (http://output.jsbin.com/nerari/14).

Further, I noticed that in the bin you provided, there is a span with an id of "drag" inside the div with an id of "innerDrag", and they both have jQuery++ drag events tied to them. However, even with this setup, jQuery++ and iScroll are behaving as expected (on touch devices, too).

Perhaps more context to the issue you're experiencing (the code you're using with iScroll options you've set, what you expected to happen, etc) would help in understanding the problem.

@mickmcgrath13
Copy link
Contributor

@whitecolor I am curious about the outcome of your issue; have you been able to solve it?

@wclr
Copy link
Author

wclr commented Nov 24, 2015

The problem It doen't work with this:

    $(document).on('touchmove', function(ev){
        ev.preventDefault()
    });

This is needed to prevent bouncing scrolling on thouch devices (for entire app).

Preventing default on touchstart event can not be used because it prevents click events on android.

So not sure what to do with that, any Ideas?

@wclr wclr changed the title drag does not work with iScroll drag does not work with touchmove default prevented Nov 25, 2015
@DreamEmulator
Copy link

I have the same issue, very interested in the sollution...

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

No branches or pull requests

3 participants