Copy to clipboard not working with http
ecker00 opened this issue · comments
Copy to clipboard does not work on http setup. For those who just use Gotify it on internal network/vpn/http, the browsers navigator.clipboard
API is not available, so the copy to clipboard button does not work. I see this feature was added in pull request: #561
Solution
This would be solved if the fallback could use the old fashioned way, something like:
const temp = document.createElement('textarea');
temp.value = value;
document.body.appendChild(temp);
temp.select();
document.execCommand('copy');
document.body.removeChild(temp);
Here:
server/ui/src/common/CopyableSecret.tsx
Lines 38 to 47 in a4c19c3
execCommand is deprecated. While it may work now, It likely breaks in the future. You should use https even if your inside internal network / vpn.