Skip to content

Commit d69a79b

Browse files
authored
Force custom editors in diff view to have 100% height wrappers (#96969)
Fix for #96968 This is a scoped fix for #96968. The cause of the issue is the following: 1. Webview must be rendered outside of the main editor DOM. We do this by absolutely positioning them over some element in the DOM. 1. In split views, we try to lay the webview out over an element that has 0 height. 1. Due to my workaround in ea07e9b, this causes the webview to either not show at all (because it also will have zero height) or partially show This fix forces the webivew's parent in the split view to have 100%. That actually seems like a reasonable default but I've scoped my fix to just webviews
1 parent c3b0ae5 commit d69a79b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/vs/workbench/contrib/webview/browser/dynamicWebviewEditorOverlay.ts

+6
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ export class DynamicWebviewEditorOverlay extends Disposable implements WebviewOv
9797
if (!this.container || !this.container.parentElement) {
9898
return;
9999
}
100+
101+
// Workaround for #94805
102+
if ((element.classList.contains('details-editor-container') || element.classList.contains('master-editor-container')) && !element.style.height) {
103+
element.style.height = '100%';
104+
}
105+
100106
const frameRect = element.getBoundingClientRect();
101107
const containerRect = this.container.parentElement.getBoundingClientRect();
102108
this.container.style.position = 'absolute';

0 commit comments

Comments
 (0)