flickity icon indicating copy to clipboard operation
flickity copied to clipboard

Drag and hold slider on desktop triggers link when you release mouse on the link/slide

Open woutervanerp opened this issue 5 years ago • 1 comments

When you drag the slider on desktop and release the mouse on the slide with the link in it, it triggers. Is there any way how this can be solved?

woutervanerp avatar Aug 05 '19 07:08 woutervanerp

Best way I've found to deal with this:

flickity.on('dragStart.flickity', function(){
  flickity.find('a').css({pointerEvents: 'none'});
});
flickity.on('dragEnd.flickity', function(){
  flickity.find('a').css({pointerEvents: 'all'});
});

From this issue: https://github.com/metafizzy/flickity/issues/409#issuecomment-431908980

NEMONAUT avatar Sep 14 '19 02:09 NEMONAUT

I'm not seeing this behavior. Flickity has code so that dragging on links does not click them. If you have a test case, I can take a look.

desandro avatar Jan 18 '23 20:01 desandro