Fix Markdown code block editor iframe bootstrap - #334955
Merged
Henning Dieterichs (hediet) merged 1 commit intoSep 7, 2026
Merged
Fix Markdown code block editor iframe bootstrap#334955Henning Dieterichs (hediet) merged 1 commit into
Henning Dieterichs (hediet) merged 1 commit into
Conversation
Use the permitted empty webview bootstrap for nested frames and update @vscode/markdown-editor to 0.0.2-90, which forwards the bootstrap URL to physical iframes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: cf6761b4-5164-41c7-8123-5da286a9798a
Copilot started reviewing on behalf of
Henning Dieterichs (hediet)
September 7, 2026 17:19
View session
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The absolute /fake.html path discards vscode.dev’s required webview endpoint prefix.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 1
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
extensions/markdown-language-features/markdown-editor-src/editor.ts — This absolute pathname drops the directory prefix used by browser webviews. On vscode.dev,… |
What changed in this PR
Fixes nested Markdown code block editor resource loading by using the permitted webview bootstrap page and updating its supporting package.
Changes:
- Updates
@vscode/markdown-editorto0.0.2-90. - Passes a
/fake.htmlbootstrap URL to nested editors.
| File | Description |
|---|---|
package.json |
Updates the Markdown editor dependency. |
package-lock.json |
Locks the updated package version. |
markdown-editor-src/editor.ts |
Constructs the nested iframe bootstrap URL. |
Files not reviewed (1)
- extensions/markdown-language-features/package-lock.json: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Henning Dieterichs (hediet)
enabled auto-merge (rebase)
September 7, 2026 17:54
Ladislau Szomoru (lszomoru)
approved these changes
Sep 7, 2026
Martin Aeschlimann (aeschli)
approved these changes
Sep 7, 2026
Henning Dieterichs (hediet)
deleted the
hediet/fix-markdown-iframe-bootstrap-integration
branch
September 7, 2026 19:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Fix resource loading in contributed Markdown code block editors by bootstrapping nested iframes through the permitted empty webview page.
/fake.htmlinstead of the outer webview's/index.html, retaining the webview origin and query parameters (including its ID).@vscode/markdown-editorfrom0.0.2-88to0.0.2-90with npm. The published package includes microsoft/vscode-packages#289, which forwards and stores the bootstrap URL all the way to the physical iframe.Why
The package previously dropped the URL, so frames fell back to
srcdocand the webview service worker could not associate their CSS/JS requests with a webview ID. Once forwarding was fixed, usinglocation.hrefexposed a second issue: Electron'sisAllowedWebviewRequestdeliberately blocks nested requests to/index.html(net::ERR_BLOCKED_BY_CLIENT)./fake.htmlis already the supported empty bootstrap used by the webview wrapper. This change does not relax navigation security restrictions.Validation
0.0.2-90has gitHead7e778f85325333474d7b4d000e1ad2382e5a47b3and inspected the installed published bundle for both constructor forwarding steps.npm run compilepassed for the Markdown extension, including its webview, notebook, and Markdown editor bundles; extension TypeScript compilation reported zero errors.npm run check-markdown-editor-package-jsonpassed (manifests unchanged).