Skip to content

Conversation

@Rani367
Copy link

@Rani367 Rani367 commented Dec 21, 2025

Summary

Fixes singleton editors (webviews, terminals, etc.) being shared between
windows when using "Copy into New Window".

Problem

When using "Copy into New Window" on a webview editor (like the integrated browser):

  • Both windows shared the same webview instance
  • Interactions were mirrored between windows
  • Performance lag/glitching occurred in animations

Solution

Treat singleton editors as moves even when the action is "copy" -
the original editor is closed after opening in the new window.

Test Plan

  • Added unit tests for singleton editor copy behavior
  • Added unit test for onWillMoveEditor event firing
  • All 64 editor group tests pass

Fixes #284525

Singleton editors (webviews, terminals, etc.) cannot be duplicated.
When using 'Copy into New Window', the original editor is now closed,
effectively making it a move operation. This fixes issues where:
- Both windows were synced (same webview instance shared)
- Performance lag/glitching occurred in animations

Fixes microsoft#284525
@vs-code-engineering
Copy link

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@bpasero

Matched files:

  • src/vs/workbench/browser/parts/editor/editorGroupView.ts
  • src/vs/workbench/services/editor/test/browser/editorGroupsService.test.ts

@Rani367
Copy link
Author

Rani367 commented Dec 21, 2025

@Rani367 please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integrated Browser: unexpected behavior with "Copy into New Window"

2 participants