From bd09ef81f24969f5eba978b950086b19ba616276 Mon Sep 17 00:00:00 2001 From: Brian Gough Date: Thu, 16 Nov 2017 15:41:16 +0000 Subject: [PATCH] added comments --- .../web/public/coffee/ide/editor/directives/aceEditor.coffee | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/services/web/public/coffee/ide/editor/directives/aceEditor.coffee b/services/web/public/coffee/ide/editor/directives/aceEditor.coffee index 12d3cc7b5b..79aad26221 100644 --- a/services/web/public/coffee/ide/editor/directives/aceEditor.coffee +++ b/services/web/public/coffee/ide/editor/directives/aceEditor.coffee @@ -356,7 +356,7 @@ define [ session.setOption("useWorker", scope.syntaxValidation); # now attach session to editor - editor.setReadOnly(true) + editor.setReadOnly(true) # set to readonly until document change handlers are attached editor.setSession(session) doc = session.getDocument() @@ -365,7 +365,8 @@ define [ editor.initing = true sharejs_doc.attachToAce(editor) editor.initing = false - editor.setReadOnly(false) + # now ready to edit document + editor.setReadOnly(scope.readOnly) # respect the readOnly setting, normally false resetScrollMargins()