Skip to content

Commit f2c692a

Browse files
committed
iframe-proxy: inject shim on error pages
1 parent 2e97fb5 commit f2c692a

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

docs/specs/dor-iframe.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ precise error *page* from the proxy origin (which frames fine): a refused remote
157157
responding at `localhost:8080` — is the dev server running?". `createIframeProxyUrl`
158158
itself returns `{ ok: false, reason }` only for the synchronous cases (chiefly an
159159
unproxyable `scheme`); reachability and frame-refusal are surfaced as served
160-
pages.
160+
pages. These served error pages include the same fixed leader shim as proxied
161+
HTML, so the keyboard escape path still works after the user clicks inside an
162+
error state.
161163

162164
### Cursor alignment (the out-of-process-frame offset)
163165

vscode-ext/src/iframe-proxy-host.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ function unreachablePage(upstream: URL, detail: string): ErrorPage {
375375
}
376376

377377
function serveErrorPage(res: http.ServerResponse, page: ErrorPage): void {
378-
const html = errorPageHtml(page);
378+
const html = instrumentHtml(errorPageHtml(page));
379379
res.writeHead(200, {
380380
'content-type': 'text/html; charset=utf-8',
381381
'content-length': Buffer.byteLength(html).toString(),

0 commit comments

Comments
 (0)