Copying invite link to clipboard appears to fail in Safari (desktop) #660
Labels
bug
Something isn't working
javascript
Pull requests that update Javascript code
priority
This item is currently being prioritized.
The issue is that Safari requires clipboard writes to be done in response to a "user gesture", and we are first doing a
fetch
to get the invite link from the API. Since the API call should only happen when the user wants to perform this operation, the safe cross-browser solution is to:useState
),In addition, for browsers like Chrome where a more seamless experience is possible, we could optionally:
await navigator.permissions.query({ name: 'clipboard-write', allowWithoutGesture: true })
to check if copying can be done noninteractively, and(see https://web.dev/articles/async-clipboard)
The text was updated successfully, but these errors were encountered: