stop firing active cell change events unnecessary (#8983)

This commit is contained in:
Chris LaFreniere
2020-01-29 13:54:48 -08:00
committed by GitHub
parent 8ff0ee59c5
commit de27f2c2a5

View File

@@ -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