Microsoft/vscode

Can't copy webview image to clipboard

Open

#292 567 ouverte le 3 févr. 2026

Voir sur GitHub
 (1 commentaire) (0 réactions) (1 assigné)TypeScript (10 221 forks)batch import
bughelp wantedwebview

Métriques du dépôt

Stars
 (74 848 stars)
Métriques de merge PR
 (Merge moyen 11h 48m) (1 000 PRs mergées en 30 j)

Description

Does this issue occur when all extensions are disabled?: Yes (only had the repro extension enabled)

  • VS Code Version:
Version: 1.108.2
Commit: c9d77990917f3102ada88be140d28b038d1dd7c7
Date: 2026-01-21T13:52:09.270Z
Electron: 39.2.7
ElectronBuildId: 12953945
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Darwin arm64 25.1.0
  • OS Version: macos Tahoe 26.1 (25B78)

Steps to Reproduce:

Steps to repro.

  1. clone https://github.com/sboult/vscode-image-copy-to-clipboard-webview/tree/master
  2. open project in vscode
  3. npm install
  4. press f5 to launch the dev extension host
  5. use CMD+SHIFT+P (command palette) and select "Show Image in Webview"
  6. when the webview comes up right click on image and select "Copy"

You will notice no image is copied to the clipboard.

However, if you highlight the image and then use the context menu to copy it will go into the clipboard.

Guide contributeur