From 598837e17c8212173b5a3cfd80287637fc359c6c Mon Sep 17 00:00:00 2001 From: Alasdair Smith Date: Tue, 20 Feb 2018 15:03:43 +0000 Subject: [PATCH] Use applyAsync to prevent issue when switching docs --- .../web/public/coffee/ide/editor/directives/cmEditor.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/web/public/coffee/ide/editor/directives/cmEditor.coffee b/services/web/public/coffee/ide/editor/directives/cmEditor.coffee index 1241e54415..37a7724d85 100644 --- a/services/web/public/coffee/ide/editor/directives/cmEditor.coffee +++ b/services/web/public/coffee/ide/editor/directives/cmEditor.coffee @@ -17,7 +17,7 @@ define [ attachToCM(sharejsDoc) attachToCM = (sharejsDoc) -> - setTimeout () -> + scope.$applyAsync () -> Frontend.richText.openDoc(cm, sharejsDoc.getSnapshot()) sharejsDoc.attachToCM(cm)