diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts index 34c0b5ae2ba655da470a0a4165ab9213149b89f0..7e85a0ee3e72fa9afea7b459c8744571697ad3a3 100644 --- a/src/vs/workbench/browser/layout.ts +++ b/src/vs/workbench/browser/layout.ts @@ -557,6 +557,15 @@ export class WorkbenchLayout extends Disposable implements IVerticalSashLayoutPr position(this.workbenchContainer, 0, 0, 0, 0, 'relative'); size(this.workbenchContainer, this.workbenchSize.width, this.workbenchSize.height); + // Bug on Chrome: Sometimes Chrome wants to scroll the workbench container on layout changes. The fix is to reset scrolling in this case. + const workbenchContainer = this.workbenchContainer; + if (workbenchContainer.scrollTop > 0) { + workbenchContainer.scrollTop = 0; + } + if (workbenchContainer.scrollLeft > 0) { + workbenchContainer.scrollLeft = 0; + } + // Title Part const titleContainer = this.parts.titlebar.getContainer(); if (isTitlebarHidden) {