copy-to-clipboard icon indicating copy to clipboard operation
copy-to-clipboard copied to clipboard

Copy to clipboard doesn't work in fullscreen mode

Open snigdha920 opened this issue 2 years ago • 1 comments

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:

  1. Click on "copy text" when it's not in full screen mode, the text "content copied" is copied to clipboard.
  2. Enter full screen mode by clicking on "enter fullscreen"
  3. 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

snigdha920 avatar Jan 09 '23 15:01 snigdha920

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

RAAMENN avatar Jan 30 '23 07:01 RAAMENN