Closed csantos1113 closed 7 months ago
It doesn't looks like a bug with react-flickity-component, more like Safari is doing weird stuff. I never get Fired? true
in my console log.
That's the thing, something is happening behind scenes in the Flickity
library that is crashing the matchMedia listeners chain to be called. And only on Safari.
This is the strangest error that I have seen.
You can get Fired? true
if you run the example in any other browser different than Safari.
btw, just for testing, you can change carousel: matches ? flickityOptions : false
===> carousel: flickityOptions
, and you will be able to see Fired? true
in your console log
looks like safari fix the matchMedia
issue https://caniuse.com/?search=matchmedia
I'm trying to render this carousel component on Small viewports, and a plain list in other viewports. I'm using
window.matchMedia
to render one or the other componentin Safari only - The second list is not able to change to the carousel, without any errors anywhere.
See this live example: https://codesandbox.io/s/5409mo1qkx