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

click issue in Chrome mobile when drag is enabled #145

Open
pixelatorz opened this issue Mar 12, 2014 · 1 comment
Open

click issue in Chrome mobile when drag is enabled #145

pixelatorz opened this issue Mar 12, 2014 · 1 comment

Comments

@pixelatorz
Copy link

In chrome mobile you can not click the elements, except the part outside the container. The drag and drop on the parent element is blocking the clicks.

screen-shot-2014-03-12-at-17 43 47

when disabling the dragging the clicking works like a charm.

@pixelatorz
Copy link
Author

In case someone has the same problem, you can fix it with disabling the drag and drop and Including hammer.js.

I Attached the animateToNextChild and animateToPreviousChild to the swipe and drag event that I trigger on the container.

var cross_selling = document.getElementById("cross-selling");
var cross_hammer = new Hammer(cross_selling, { drag_max_touches: 0 });

cross_hammer.on("dragleft", function(ev) {
  $('ul#carrousel').roundabout('animateToNextChild');
});
 cross_hammer.on("swipeleft", function(ev) {
 $('ul#carrousel').roundabout('animateToNextChild');
});

cross_hammer.on("dragright", function(ev) {
  $('ul#carrousel').roundabout('animateToPreviousChild');
});
 cross_hammer.on("swiperight", function(ev) {
 $('ul#carrousel').roundabout('animateToPreviousChild');
});

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

1 participant