From de27f2c2a5baeb9f63cb3ea575411a01f98a9c37 Mon Sep 17 00:00:00 2001 From: Chris LaFreniere <40371649+chlafreniere@users.noreply.github.com> Date: Wed, 29 Jan 2020 13:54:48 -0800 Subject: [PATCH] stop firing active cell change events unnecessary (#8983) --- .../contrib/notebook/browser/notebook.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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