Skip to content

Commit 0ed0867

Browse files
committed
Revert "Revert "fixes microsoft#78167""
This reverts commit e8c6bfc.
1 parent 2666336 commit 0ed0867

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

src/vs/base/browser/ui/grid/gridview.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,7 @@ class BranchNode implements ISplitView, IDisposable {
348348
}
349349

350350
this.splitview.setViewVisible(index, visible);
351+
this._onDidChange.fire(undefined);
351352
}
352353

353354
getChildCachedVisibleSize(index: number): number | undefined {

src/vs/base/browser/ui/splitview/splitview.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
white-space: initial;
4040
flex: none;
4141
position: relative;
42+
overflow: hidden;
4243
}
4344

4445
.monaco-split-view2 > .split-view-container > .split-view-view:not(.visible) {
@@ -72,4 +73,4 @@
7273
.monaco-split-view2.separator-border.vertical > .split-view-container > .split-view-view:not(:first-child)::before {
7374
height: 1px;
7475
width: 100%;
75-
}
76+
}

src/vs/base/browser/ui/splitview/splitview.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,10 @@ abstract class ViewItem {
125125
dom.addClass(container, 'visible');
126126
}
127127

128-
abstract layout(): void;
128+
layout(): void {
129+
this.container.scrollTop = 0;
130+
this.container.scrollLeft = 0;
131+
}
129132

130133
layoutView(orientation: Orientation): void {
131134
this.view.layout(this.size, orientation);
@@ -140,6 +143,7 @@ abstract class ViewItem {
140143
class VerticalViewItem extends ViewItem {
141144

142145
layout(): void {
146+
super.layout();
143147
this.container.style.height = `${this.size}px`;
144148
this.layoutView(Orientation.VERTICAL);
145149
}
@@ -148,6 +152,7 @@ class VerticalViewItem extends ViewItem {
148152
class HorizontalViewItem extends ViewItem {
149153

150154
layout(): void {
155+
super.layout();
151156
this.container.style.width = `${this.size}px`;
152157
this.layoutView(Orientation.HORIZONTAL);
153158
}

0 commit comments

Comments
 (0)