Use applyAsync to prevent issue when switching docs

This commit is contained in:
Alasdair Smith
2018-02-22 11:44:09 +00:00
parent c5735a31df
commit 598837e17c
@@ -17,7 +17,7 @@ define [
attachToCM(sharejsDoc)
attachToCM = (sharejsDoc) ->
setTimeout () ->
scope.$applyAsync () ->
Frontend.richText.openDoc(cm, sharejsDoc.getSnapshot())
sharejsDoc.attachToCM(cm)