From cdfa483446285cf450491d877329750a3578b718 Mon Sep 17 00:00:00 2001 From: Jonas Date: Tue, 10 Oct 2023 16:05:28 +0200 Subject: [PATCH] fix(TextEditor): Take care of new `newPageContent` flag Incorporate changes from #929 into new component. Signed-off-by: Jonas --- src/components/Page/TextEditor.vue | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/components/Page/TextEditor.vue b/src/components/Page/TextEditor.vue index b42767121..0120d3748 100644 --- a/src/components/Page/TextEditor.vue +++ b/src/components/Page/TextEditor.vue @@ -225,20 +225,7 @@ export default { */ readyEditor() { this.done('editor') - this.readMode = false - - // Don't steal the focus from title if a new page - if (this.loading('newPage')) { - this.done('newPage') - return - } - - if (this.isTextEdit) { - this.$nextTick(() => { - this.focusEditor() - }) - } }, initEditMode() { @@ -247,10 +234,11 @@ export default { // for template pages || this.isTemplatePage // for new pages - || this.loading('newPage') + || this.loading('newPageContent') // or when page is empty || !this.pageContent?.trim()) { this.setTextEdit() + this.done('newPageContent') } },