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
Verified on macOS 26.7.1 arm64 using VS Code Insiders 1.142.0-insider (ff00e788322523ee1e9e8ee2c9bb4b89af93a3c2).
I opened a .md file with a fenced code block in the Markdown Editor, clicked the Explorer so the editor no longer had focus, hovered the code block, clicked Copy once, and pasted into a new untitled editor. I checked the editor's focus before the click, the button's feedback, and the system clipboard, and ran the same steps on Insiders ed380adf, the last Insiders build without the fix, as a baseline.
Verified:
The Copy button is hidden until the code block is hovered, then appears in its upper-right corner
The first click works while the Markdown Editor does not have focus
The copied text matches the code block exactly, without the fences
Pasting into another editor produces the same text
Results:
ed380adf: the first click showed "Could not copy code block. Try again.", the clipboard was unchanged, and the console logged NotAllowedError: Document is not focused
Insiders: the first click showed "Code block copied", the system clipboard contained exactly the three code lines, and no copy errors were logged
Pasting into an untitled editor produced the same three lines
Copying a code block from the Markdown Editor works on the first click in current Insiders, including after focus moves elsewhere.
Activity
[-]Markdown code-block Copy[/-][+]TPI: Markdown code-block Copy[/+]anthonykim1 commentedon Oct 12, 2026
Verified on macOS 26.7.1 arm64 using VS Code Insiders 1.142.0-insider (
ff00e788322523ee1e9e8ee2c9bb4b89af93a3c2).I opened a
.mdfile with a fenced code block in the Markdown Editor, clicked the Explorer so the editor no longer had focus, hovered the code block, clicked Copy once, and pasted into a new untitled editor. I checked the editor's focus before the click, the button's feedback, and the system clipboard, and ran the same steps on Insidersed380adf, the last Insiders build without the fix, as a baseline.Verified:
Results:
ed380adf: the first click showed "Could not copy code block. Try again.", the clipboard was unchanged, and the console loggedNotAllowedError: Document is not focusedCopying a code block from the Markdown Editor works on the first click in current Insiders, including after focus moves elsewhere.