From ddf9834eaea9f234e4b25f413364f7de4bd12a87 Mon Sep 17 00:00:00 2001 From: Scott Cooper Date: Thu, 22 Mar 2018 15:31:20 -0700 Subject: [PATCH] fix(core): allow less intensive event emitters to be inside angular zone --- src/lib/codemirror.component.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/codemirror.component.ts b/src/lib/codemirror.component.ts index 7b24205..8d05d2b 100644 --- a/src/lib/codemirror.component.ts +++ b/src/lib/codemirror.component.ts @@ -99,13 +99,13 @@ export class CodemirrorComponent this._ngZone.runOutsideAngular(() => { this.codeMirror = fromTextArea(this.ref.nativeElement, this._options); - this.codeMirror.on('change', this.codemirrorValueChanged.bind(this)); this.codeMirror.on('cursorActivity', this.cursorActive.bind(this)); - this.codeMirror.on('focus', this.focusChanged.bind(this, true)); - this.codeMirror.on('blur', this.focusChanged.bind(this, false)); this.codeMirror.on('scroll', this.scrollChanged.bind(this)); - this.codeMirror.setValue(this.value); }); + this.codeMirror.on('blur', this.focusChanged.bind(this, false)); + this.codeMirror.on('focus', this.focusChanged.bind(this, true)); + this.codeMirror.on('change', this.codemirrorValueChanged.bind(this)); + this.codeMirror.setValue(this.value); } ngDoCheck() { if (!this._differ) {