From ed6c2eca2d09587ff2470fc397ccf2414e7609d7 Mon Sep 17 00:00:00 2001 From: Peng Lyu Date: Thu, 25 Jan 2024 13:05:50 -0800 Subject: [PATCH] Fix #203434. Avoid layout from sticky scroll event if the editor is set to invisible. (#203485) --- .../workbench/contrib/notebook/browser/notebookEditorWidget.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts b/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts index 5554136a78c..576970d7a33 100644 --- a/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts +++ b/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts @@ -1079,7 +1079,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD return; } - if (this._dimension) { + if (this._dimension && this._isVisible) { if (sizeDelta > 0) { // delta > 0 ==> sticky is growing, cell list shrinking this.layout(this._dimension); this.setScrollTop(this.scrollTop + sizeDelta);