[BUG] Browser pane: local HTML files lose JavaScript (outside project) or the Clipboard API (inside project), with no indication to the user
Status Open
Reported on v2.1.289
Maintainer reply None cached
Activity 0 comments · opened Oct 9, 2026
Environment
Claude desktop 2.31226.0 (Code tab), Claude Code 2.1.289, macOS 27.0.1, Apple Silicon.
What happens
Claude often delivers work as a self-contained interactive HTML file (copy buttons, checkboxes). Opened in the built-in Browser pane, those controls silently do nothing.
- File outside the session's project folder (e.g.
~/Downloads): the pane renders it as a static snapshot. No scripts run. The tool result says "files outside the project folder render as static snapshots", but nothing in the pane tells the user. - File inside the project folder: scripts run and click handlers fire, but the document is loaded as a
data:URL (location.protocol === "data:",origin === "null",isSecureContext === false), sonavigator.clipboardis undefined and "Copy" buttons fail.
Repro
Save this as test.html, open it in the Browser pane from inside and from outside the project folder:
<p id="inline">INLINE SCRIPT: did not run</p>
<button onclick="navigator.clipboard.writeText('x').then(()=>this.textContent='copied')">Copy</button>
<script>document.getElementById('inline').textContent='INLINE SCRIPT: ran'</script>
- Outside the project: the text stays "did not run".
- Inside the project: the text says "ran"; clicking Copy throws "Cannot read properties of undefined (reading 'writeText')".
- In Chrome via
file://: both work.
Expected
Either local files get a context where the Clipboard API works, or the pane shows a visible notice ("scripts are disabled for this file — open in your browser") so the page doesn't look broken.