Skip to content

Workaround zero size layouts of webview elements#312649

Merged
mjbvz merged 2 commits intomicrosoft:mainfrom
mjbvz:dev/mjbvz/selected-chimpanzee
Apr 27, 2026
Merged

Workaround zero size layouts of webview elements#312649
mjbvz merged 2 commits intomicrosoft:mainfrom
mjbvz:dev/mjbvz/selected-chimpanzee

Conversation

@mjbvz
Copy link
Copy Markdown
Collaborator

@mjbvz mjbvz commented Apr 27, 2026

Fixes #312600

Targeted fix. Seems a bit suspicious the editor layout logic upstream doesn't do this for us

Fixes microsoft#312600

Targeted fix. Seems a bit suspicious the editor layout logic upstream doesn't do this for us
Copilot AI review requested due to automatic review settings April 27, 2026 01:05
@mjbvz mjbvz enabled auto-merge April 27, 2026 01:05
@mjbvz mjbvz added this to the 1.118.0 milestone Apr 27, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a workaround in the webview editor pane to treat zero-sized layouts as effectively “not visible”, aiming to prevent webview overlays from remaining visible as tiny, unmovable windows when an editor group is maximized (per #312600).

Changes:

  • Update WebviewEditor.layout() to call setEditorVisible(...) based on whether the incoming layout dimensions are non-zero.
Show a summary per file
File Description
src/vs/workbench/contrib/webviewPanel/browser/webviewEditor.ts Toggles the webview editor’s visible state based on layout dimensions to avoid stray webview overlay rendering at 0 size.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment thread src/vs/workbench/contrib/webviewPanel/browser/webviewEditor.ts
Co-authored-by: Copilot <copilot@github.com>
@mjbvz mjbvz merged commit 7326d67 into microsoft:main Apr 27, 2026
26 checks passed
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.

[BUG] Maximizing editor group does not hide preview window

3 participants