mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-20 07:09:53 +01:00
Don't give webview a width if its container has none
Fixes #94805 When the panel is maximized over a webview, on reload VS Code calls `.layout` with the dimensions of the editor. However in this case, the dimensions do not match what is actually visible In this case, the parent element should have zero width so we should make sure that we do not try giving the webview a width too
This commit is contained in:
@@ -102,8 +102,8 @@ export class DynamicWebviewEditorOverlay extends Disposable implements WebviewOv
|
||||
this.container.style.position = 'absolute';
|
||||
this.container.style.top = `${frameRect.top - containerRect.top}px`;
|
||||
this.container.style.left = `${frameRect.left - containerRect.left}px`;
|
||||
this.container.style.width = `${dimension ? dimension.width : frameRect.width}px`;
|
||||
this.container.style.height = `${dimension ? dimension.height : frameRect.height}px`;
|
||||
this.container.style.width = `${dimension && frameRect.width > 0 ? dimension.width : frameRect.width}px`;
|
||||
this.container.style.height = `${dimension && frameRect.height > 0 ? dimension.height : frameRect.height}px`;
|
||||
}
|
||||
|
||||
private show() {
|
||||
|
||||
Reference in New Issue
Block a user