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
This commit is contained in:
Kevin Cunnane
2019-06-10 16:28:59 -07:00
committed by GitHub
parent f05260d95a
commit 730ad4b814

View File

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