copy-to-clipboard
copy-to-clipboard copied to clipboard
Copy to clipboard doesn't work in fullscreen mode
Copy to clipboard doesn't work when in fullscreen mode.
Here's the reproduction: https://codesandbox.io/s/react-hooks-counter-demo-forked-ogi0uf?file=/src/index.js
Steps to reproduce:
- Click on "copy text" when it's not in full screen mode, the text "content copied" is copied to clipboard.
- Enter full screen mode by clicking on "enter fullscreen"
- Click on "copy text" when it's not in full screen mode, nothing is copied to clipboard.
I'm using react-copy-to-clipboard which uses this package under the hood. I found this related issue: https://github.com/sudodoki/copy-to-clipboard/issues/102
Same problem here, and I saw 2 PR related to this issue but not accepted yet. Don't know why.
I tried use navigator.clipboard.writeText instead. https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/writeText
It works good with fullscreen