Просмотр исходного кода

Use applyAsync to prevent issue when switching docs

Alasdair Smith 8 лет назад
Родитель
Сommit
598837e17c
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      services/web/public/coffee/ide/editor/directives/cmEditor.coffee

+ 1 - 1
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)