The await That Silently Breaks navigator.clipboard.writeText()
DEV Community
The await That Silently Breaks navigator.clipboard.writeText()
navigator.clipboard.writeText() only works while the document is focused and the user gesture is still fresh. Any await before the call can let both expire, so a copy button fails with an uncaught NotAllowedError and nobody ever sees why.
0 comments
No comments yet.