From 730ad4b814d1742f75c247cd08021afcfcc7254e Mon Sep 17 00:00:00 2001 From: Kevin Cunnane Date: Mon, 10 Jun 2019 16:28:59 -0700 Subject: [PATCH] Fix outputs constantly focusing on new output (#5959) - Only scroll if it's the 1st output, not for subsequent ones - Otherwise can't use notebook while a cell is running & regularly updating the outputs --- src/sql/workbench/parts/notebook/models/cell.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sql/workbench/parts/notebook/models/cell.ts b/src/sql/workbench/parts/notebook/models/cell.ts index ff7b053285..60c81a15e0 100644 --- a/src/sql/workbench/parts/notebook/models/cell.ts +++ b/src/sql/workbench/parts/notebook/models/cell.ts @@ -402,7 +402,9 @@ export class CellModel implements ICellModel { // deletes transient node in the serialized JSON delete output['transient']; this._outputs.push(this.rewriteOutputUrls(output)); - this.fireOutputsChanged(true); + // Only scroll on 1st output being added + let shouldScroll = this._outputs.length === 1; + this.fireOutputsChanged(shouldScroll); } }