We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It failed to copy to clipboard with DOMException document not focused in latest firefox / chrome.
It seems to me the root clause is at the
use-clippy/src/use-clippy.ts
Line 112 in 4a92a6c
It seems it works if I restore the original focus:
const write = (text: string): void => { const textArea: HTMLTextAreaElement = createTextArea(); const curActiveElement = document.activeElement as HTMLElement textArea.value = text; textArea.select(); const success: boolean = document.execCommand('copy'); removeElement(textArea); if(curActiveElement) curActiveElement.focus() if (!success) { throw NOT_ALLOWED_ERROR; } };
I guess similar problem exists for reading the clipboard but I did not use / test it.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
It failed to copy to clipboard with DOMException document not focused in latest firefox / chrome.
It seems to me the root clause is at the
use-clippy/src/use-clippy.ts
Line 112 in 4a92a6c
It seems it works if I restore the original focus:
I guess similar problem exists for reading the clipboard but I did not use / test it.
The text was updated successfully, but these errors were encountered: