Use applyAsync to prevent issue when switching docs

This commit is contained in:
Alasdair Smith 2018-02-20 15:03:43 +00:00
parent c5735a31df
commit 598837e17c

View file

@ -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)