Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: fullscreen copy #100

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

haite
Copy link

@haite haite commented Aug 4, 2020

No description provided.

@daggmano
Copy link

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?

@haite
Copy link
Author

haite commented Nov 12, 2020

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.

@sudodoki
Copy link
Owner

Help me out, can't understand this fully. If we have fullscreen, which container would work and why document.body doesn't?

@daggmano
Copy link

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.

@sudodoki
Copy link
Owner

@daggmano yeah, given #108 and overall feeling about this project, I would probably envision transitioning into navigator.clipboard and deprecating this library altogether

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants