You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[bug] Copy message button does not work on web interface #27992
On the web interface, clicking the "Copy" button on a message does not copy the content to the clipboard. This happens because navigator.clipboard.writeText() can fail in non-secure contexts (non-HTTPS) or when the clipboard API is blocked by browser permissions.
Steps to reproduce
Open the OpenCode web interface
Click the copy button on any message
The button does not copy the content and no feedback is shown
Fix
Added a fallback using the traditional document.execCommand("copy") method via a temporary textarea element, which works even when the Clipboard API is unavailable. Also added a check to only update the "copied" state if the copy actually succeeded.
Activity
github-actions commentedon May 17, 2026
This issue might be a duplicate of existing issues. Please check:
navigator.clipboard.writeText()requires a secure context) with the same proposeddocument.execCommand("copy")fallback fix.Please review that issue and consider whether your report adds anything new. If so, feel free to clarify the distinction.