RhysSullivan / shiptalkers

https://shiptalkers.dev
677 stars 36 forks source link

Use `navigator.share` API for mobile for image copying #83

Open maxdemaio opened 3 weeks ago

vercel[bot] commented 3 weeks ago

@maxdemaio is attempting to deploy a commit to the rhyssullivan's projects Team on Vercel.

A member of the Team first needs to authorize it.

maxdemaio commented 3 weeks ago

This should close #82

maxdemaio commented 3 weeks ago

I haven't set up the repo yet so I need to test this more. But I have a repo where I made this change since the clipboard api doesn't work on Safari on mobile.

vercel[bot] commented 3 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
shiptalkers ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 13, 2024 3:55pm
maxdemaio commented 3 weeks ago

Screenshot of it working on Safari!

image

Chrome shouldn't have navigator.share and I tested it works the same.

Fun fact, both Safari and FireFox don't consider localhost to be a secure context even if you try and run NextJs in a secure context. Also, the docs mention both navigator.clipboard and navigator.share don't work in non-secure contexts yet it worked when testing locally. We take those 🤷🏻