sync clipboard only if in focus #373.

This commit is contained in:
Miroslav Šedivý 2024-06-16 22:27:46 +02:00
parent 11a862f101
commit 4ab5901ba9

View File

@ -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) {