mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Prevent CM/Sharejs adapter from overwriting value in editor
This commit is contained in:
parent
9cf9a7e4fc
commit
8abf3593fb
1 changed files with 3 additions and 2 deletions
|
@ -36,8 +36,9 @@ window.sharejs.extendDoc 'attach_cm', (editor, keepEditorContents) ->
|
|||
console.error "Text does not match!"
|
||||
console.error "editor: #{editorText}"
|
||||
console.error "ot: #{otText}"
|
||||
# Replace the editor text with the doc snapshot.
|
||||
editor.setValue sharedoc.getText()
|
||||
# Removed editor.setValue here as it would cause recursive loops if
|
||||
# consistency check failed - because setting the value would trigger
|
||||
# the change event
|
||||
, 0
|
||||
|
||||
if keepEditorContents
|
||||
|
|
Loading…
Reference in a new issue