From 4ab5901ba94d7107a75673de872c1dab5694cafd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Sun, 16 Jun 2024 22:27:46 +0200 Subject: [PATCH] sync clipboard only if in focus #373. --- client/src/components/video.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/video.vue b/client/src/components/video.vue index 877780c4..848d9408 100644 --- a/client/src/components/video.vue +++ b/client/src/components/video.vue @@ -630,7 +630,7 @@ } async syncClipboard() { - if (this.clipboard_read_available) { + if (this.clipboard_read_available && window.document.hasFocus()) { try { const text = await navigator.clipboard.readText() if (this.clipboard !== text) {