opentofu.org
opentofu.org copied to clipboard
🐛 [BUG] - Copy button doesn't work in Safari
Description
There is a copy button on code snippets, which should insert the snippet's content into the user's clipboard. It doesn't work properly in Safari (inserts a few spaces).
Reproduction steps
1. Go to 'https://opentofu.org/docs/language/state/encryption/#configuration' in Safari
2. Click on 'Copy button' (right upper corner of the snippet)
3. Try to paste it somewhere
Screenshots
No response
Logs
No response
Browsers
Safari
OS
Mac
@damianstasik I have no Mac, could you please take a look at this?
I can reproduce the issue on Safari and it looks like copy-text-to-clipboard package is having some issues there. We could try switching to Clipboard API which has pretty good support and would fix this issue.