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

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

maxdemaio
Copy link

No description provided.

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.

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