flickity icon indicating copy to clipboard operation
flickity copied to clipboard

Firefox (v62.0) fires the new staticClick (v2.1.2) event twice on mobile devices

Open MezMerrit opened this issue 7 years ago • 3 comments

Although I have draggable set to false, I have solved this issue for myself using a standard on('click') event, but it bares reporting just in case it's a bug.

In normal and responsive mode (with no device selected) Firefox behaves as expected, however when a device is selected staticClick fires twice. I have a Pipo tablet here running a previous version of Firefox, same result. I suspect the second event is a mouseup event fired on or around this piece of code:

setTimeout(function(){delete this.isIgnoringMouseUp}.bind(this),400)

Not that I'm complaining because I adore Flickity and all the work you've done. :)

I'm using it as a content slider with a nested carousel, which seems to behave nicely once you work out where/how to control event bubbling. Thumbs up from me!

/* content slider */ $pages = $('#container');

$pages.on( 'staticClick.flickity', function( event, pointer, pageElement, pageIndex ) { if ( !pageElement ) return; else if ($(event.target).closest('#carousel').length > 0) return; else event.preventDefault(); ... });

$pages.flickity({ ... });

pager = $pages.data('flickity'); pager.options.draggable = false; pager.updateDraggable();

/* nested carousel */ $carousel = $('#carousel'); $carousel.flickity({ ... });

MezMerrit avatar Sep 19 '18 11:09 MezMerrit

Thanks for reporting this issue. I'll have to take a look.

desandro avatar Sep 20 '18 20:09 desandro

No worries :) Feel free to close this issue. As mentioned, it's not really an issue to me personally but it might be for someone else. (watch me speak too soon and find out I really do need staticClick later lol)

MezMerrit avatar Sep 21 '18 09:09 MezMerrit

This is creating a webcompat issue on a website for Firefox https://github.com/webcompat/web-bugs/issues/40939

karlcow avatar May 06 '21 02:05 karlcow

I'm not able to reproduce this bug in Firefox v108 using the Events demo. I think we can close this one.

desandro avatar Jan 19 '23 13:01 desandro