Explorar o código

Merge pull request #346 from sharelatex/as-fix-cursor

Fix bug where cursor position wouldn't be saved when switching documents
Alasdair Smith %!s(int64=8) %!d(string=hai) anos
pai
achega
ff88b0adaf
Modificáronse 1 ficheiros con 5 adicións e 3 borrados
  1. 5 3
      services/web/app/views/project/editor/editor.pug

+ 5 - 3
services/web/app/views/project/editor/editor.pug

@@ -36,7 +36,8 @@ div.full-size(
 
 		#editor(
 			ace-editor="editor",
-			ng-if="!!editor.sharejs_doc && !editor.opening && !editor.richText"
+			ng-if="!editor.richText",
+			ng-show="!!editor.sharejs_doc && !editor.opening",
 			theme="settings.theme",
 			keybindings="settings.mode",
 			font-size="settings.fontSize",
@@ -69,8 +70,9 @@ div.full-size(
 
 		if hasFeature('rich-text')
 			#editor-rich-text(
-				cm-editor
-				ng-if="!editor.opening && editor.richText"
+				cm-editor,
+				ng-if="editor.richText"
+				ng-show="!!editor.sharejs_doc && !editor.opening"
 				sharejs-doc="editor.sharejs_doc"
 			)