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);