web/cobalt.js: fix copying text on click

Signed-off-by: jj <log@riseup.net>
This commit is contained in:
jj 2024-05-25 15:12:18 +02:00 committed by GitHub
parent 5c11e57e00
commit abd9f2eb87
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -128,7 +128,7 @@ const copy = (id, data) => {
if (data) {
navigator.clipboard.writeText(data)
} else {
navigator.clipboard.writeText(e.innerText)
navigator.clipboard.writeText(target.textContent)
}
}