diff --git a/src/sql/workbench/contrib/notebook/browser/notebook.component.ts b/src/sql/workbench/contrib/notebook/browser/notebook.component.ts index ffe91c3d9d..2d7f485f38 100644 --- a/src/sql/workbench/contrib/notebook/browser/notebook.component.ts +++ b/src/sql/workbench/contrib/notebook/browser/notebook.component.ts @@ -183,8 +183,10 @@ export class NotebookComponent extends AngularDisposable implements OnInit, OnDe if (event) { event.stopPropagation(); } - this.model.updateActiveCell(cell); - this.detectChanges(); + if (!this.model.activeCell || this.model.activeCell.id !== cell.id) { + this.model.updateActiveCell(cell); + this.detectChanges(); + } } //Saves scrollTop value on scroll change