Fix RO mode
parent
1958739fb4
commit
efc5fa6b2c
|
@ -1132,7 +1132,8 @@ export class Client implements ConfigContainer {
|
||||||
});
|
});
|
||||||
}).catch(console.error);
|
}).catch(console.error);
|
||||||
|
|
||||||
if (loadingDifferentPage) {
|
// When loading a different page OR if the page is read-only (in which case we don't want to apply local patches, because there's no point)
|
||||||
|
if (loadingDifferentPage || doc.meta.perm === "ro") {
|
||||||
const editorState = createEditorState(
|
const editorState = createEditorState(
|
||||||
this,
|
this,
|
||||||
pageName,
|
pageName,
|
||||||
|
@ -1145,6 +1146,7 @@ export class Client implements ConfigContainer {
|
||||||
}
|
}
|
||||||
this.space.watchPage(pageName);
|
this.space.watchPage(pageName);
|
||||||
} else {
|
} else {
|
||||||
|
// Just apply minimal patches so that the cursor is preserved
|
||||||
await editor.setText(doc.text);
|
await editor.setText(doc.text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue