We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6dffe99 commit ceff0e2Copy full SHA for ceff0e2
1 file changed
lib/datatip-manager.ts
@@ -535,11 +535,11 @@ export class DataTipManager {
535
536
// TODO we should not need this
537
/** A manual copy listener */
538
-function copyListener(event: KeyboardEvent) {
+async function copyListener(event: KeyboardEvent) {
539
event.preventDefault()
540
if (event.ctrlKey && event.key === "c") {
541
const text = document.getSelection()?.toString() ?? ""
542
- navigator.clipboard.writeText(text).catch(() => {})
+ await navigator.clipboard.writeText(text)
543
}
544
545
0 commit comments