Explorar o código

Use applyAsync to prevent issue when switching docs

Alasdair Smith %!s(int64=8) %!d(string=hai) anos
pai
achega
598837e17c

+ 1 - 1
services/web/public/coffee/ide/editor/directives/cmEditor.coffee

@@ -17,7 +17,7 @@ define [
             attachToCM(sharejsDoc)
             attachToCM(sharejsDoc)
 
 
         attachToCM = (sharejsDoc) ->
         attachToCM = (sharejsDoc) ->
-          setTimeout () ->
+          scope.$applyAsync () ->
             Frontend.richText.openDoc(cm, sharejsDoc.getSnapshot())
             Frontend.richText.openDoc(cm, sharejsDoc.getSnapshot())
             sharejsDoc.attachToCM(cm)
             sharejsDoc.attachToCM(cm)