Skip to content

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

Open
maxdemaio wants to merge 4 commits intoRhysSullivan:mainfrom
maxdemaio:mobile-copy
Open

Use navigator.share API for mobile for image copying#83
maxdemaio wants to merge 4 commits intoRhysSullivan:mainfrom
maxdemaio:mobile-copy

Conversation

@maxdemaio
Copy link

No description provided.

@vercel
Copy link

vercel bot commented Jun 13, 2024

@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
Copy link
Author

This should close #82

@maxdemaio
Copy link
Author

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
Copy link

vercel bot commented Jun 13, 2024

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
Copy link
Author

maxdemaio commented Jun 14, 2024

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 🤷🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant