mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
sync clipboard only if in focus #373.
This commit is contained in:
parent
11a862f101
commit
4ab5901ba9
@ -630,7 +630,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
async syncClipboard() {
|
async syncClipboard() {
|
||||||
if (this.clipboard_read_available) {
|
if (this.clipboard_read_available && window.document.hasFocus()) {
|
||||||
try {
|
try {
|
||||||
const text = await navigator.clipboard.readText()
|
const text = await navigator.clipboard.readText()
|
||||||
if (this.clipboard !== text) {
|
if (this.clipboard !== text) {
|
||||||
|
Loading…
Reference in New Issue
Block a user