copy-to-clipboard
copy-to-clipboard copied to clipboard
feat: fullscreen copy
This looks really interesting. We have an issue where no text is copied in Chrome when we have expanded an element to full screen (as distinct from the entire browser page beign full screen). Is this a scenario in mind here? Is there any progress here?
This looks really interesting. We have an issue where no text is copied in Chrome when we have expanded an element to full screen (as distinct from the entire browser page beign full screen). Is this a scenario in mind here? Is there any progress here?
yes, but CI build failed.
Help me out, can't understand this fully. If we have fullscreen, which container
would work and why document.body
doesn't?
Yeah, looks like this is not required. We had a weird issue where the clipboard copy wasn't working in Chrome (only) when in full-screen mode, but the full-screen was from a React element rather than F11. A bit obscure. Anyway, I went down the above path but it made no difference in the end. We ended up using code to try the native navigator.clipboard.writeText()
method first, and only falling back to copy-to-clipboard
if this wasn't available or failed. It would be good if that was an integral step in this package, so that e.g react-copy-to-clipboard
can benefit from this. I had a think about a PR to do that, it's not hard, but would mean the callback would change (no data to send back). Since that's a breaking change to the API that's your call.
@daggmano yeah, given #108 and overall feeling about this project, I would probably envision transitioning into navigator.clipboard
and deprecating this library altogether