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

Copy to clipboard not working within Swal2 modal #20

Open
zaycation opened this issue Apr 5, 2021 · 1 comment
Open

Copy to clipboard not working within Swal2 modal #20

zaycation opened this issue Apr 5, 2021 · 1 comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@zaycation
Copy link
Owner

navigator.clipboard.writeText("https://jewel-jack.netlify.app");

This same exact line of code works for the button below the game, but doesn't seem to work within the sweetalert2 modal. Try and resolve this conflict if you can!

@zaycation zaycation added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels Apr 5, 2021
@TisRyno
Copy link
Contributor

TisRyno commented Apr 5, 2021

Copying via code is notoriously difficult due to browser restrictions for safety.

I'd suggest using a library like Clipboard.js for full compatibility

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants