Closed
Description
Description
It's impossible to copy attachment link when accessing gitea over local network:
JavaScript error: Uncaught TypeError: Cannot read properties of undefined (reading 'writeText') (http://192.168.9.56:3000/assets/js/index.js?v=1.20.1 @ 54:4159).
It tries to copy text using navigator.clipboard.writeText(x)
but navigator.clipboard
is available only when url is either HTTPS or localhost.
There are workarounds for "insecure sources" such as document.execCommand('copy')
.
Or probably checking window.isSecureContext
(which is true
for both HTTPS and localhost) and showing a proper error message would be also fine.
Gitea Version
1.20.1
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
Git Version
No response
Operating System
No response
How are you running Gitea?
Running file gitea-1.20.1-windows-4.0-amd64.exe
Database
None