diff --git a/src/vs/platform/clipboard/browser/clipboardService.ts b/src/vs/platform/clipboard/browser/clipboardService.ts index 6e0a6e018d050..780d7a9cc3d80 100644 --- a/src/vs/platform/clipboard/browser/clipboardService.ts +++ b/src/vs/platform/clipboard/browser/clipboardService.ts @@ -124,8 +124,8 @@ export class BrowserClipboardService extends Disposable implements IClipboardSer // Clear resources given we are writing text this.clearResourcesState(); - // With type: only in-memory is supported - if (type) { + // With type (except 'clipboard'): only in-memory is supported + if (type && type !== 'clipboard') { this.mapTextToType.set(type, text); this.logService.trace('BrowserClipboardService#writeText'); return; @@ -178,7 +178,7 @@ export class BrowserClipboardService extends Disposable implements IClipboardSer async readText(type?: string): Promise { this.logService.trace('BrowserClipboardService#readText called with type:', type); // With type: only in-memory is supported - if (type) { + if (type && type !== 'clipboard') { const readText = this.mapTextToType.get(type) || ''; this.logService.trace('BrowserClipboardService#readText text.length:', readText.length); return readText; diff --git a/src/vs/workbench/services/clipboard/browser/clipboardService.ts b/src/vs/workbench/services/clipboard/browser/clipboardService.ts index b34de0a2593ac..a2dd0f6555a1a 100644 --- a/src/vs/workbench/services/clipboard/browser/clipboardService.ts +++ b/src/vs/workbench/services/clipboard/browser/clipboardService.ts @@ -43,7 +43,7 @@ export class BrowserClipboardService extends BaseBrowserClipboardService { type = 'vscode-tests'; // force in-memory clipboard for tests to avoid permission issues } - if (type) { + if (type && type !== 'clipboard') { this.logService.trace('BrowserClipboardService#super.readText'); return super.readText(type); }