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

Emoji confetti broken on iOS Safari #209

Closed
avmdstudent opened this issue Nov 10, 2023 · 3 comments
Closed

Emoji confetti broken on iOS Safari #209

avmdstudent opened this issue Nov 10, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@avmdstudent
Copy link

Thank you so much for creating and maintaining this package, the effects are beautiful and performant on all platforms tested 🎉

It seems that the new emoji confetti feature is broken on iOS Safari (tested on iOS 17 iPhone SE 2022). The emoji confetti effect will not render on iOS devices. Attempting to create the emoji confetti will also freeze any confetti already drawn on the canvas (the suspended particles only go away after a page refresh). I was able to reproduce this on my own app as well as the demo (https://www.kirilv.com/canvas-confetti/). Is there something about the ios emoji font that causes this behavior?

@catdad catdad added the bug Something isn't working label Nov 11, 2023
@catdad
Copy link
Owner

catdad commented Nov 11, 2023

Huh, that is so weird. I tested it when I was developing this feature on iOS 16 and it was working great. My iPad is on iOS 17 now and sure enough, exactly what you described happens. What's even weirder is that I don't see anything in the console either. I'll definitely be taking a look at this this week when I have some more time.

@catdad
Copy link
Owner

catdad commented Nov 14, 2023

I guess I must have checked some intermediary state on my iPad, because sure enough, Safari does not support creating a canvas pattern using ImageBitmap, and it seems they have not supported it for quite a while:

I am looking for a workaround for iOS

catdad added a commit that referenced this issue Nov 16, 2023
workaround for bitmap (emoji) confetti on browsers that don't support ImageBitmap canvas patterns (safari)
@catdad
Copy link
Owner

catdad commented Nov 17, 2023

A fix for this has been released in version 1.9.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants