flickity
flickity copied to clipboard
Firefox (v62.0) fires the new staticClick (v2.1.2) event twice on mobile devices
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({ ... });
Thanks for reporting this issue. I'll have to take a look.
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)
This is creating a webcompat issue on a website for Firefox https://github.com/webcompat/web-bugs/issues/40939
I'm not able to reproduce this bug in Firefox v108 using the Events demo. I think we can close this one.