Skip to content

Commit

Permalink
fix(TextEditor): Take care of new newPageContent flag
Browse files Browse the repository at this point in the history
Incorporate changes from #929 into new component.

Signed-off-by: Jonas <jonas@freesources.org>
  • Loading branch information
mejo- committed Oct 11, 2023
1 parent 179e2bd commit cdfa483
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/components/Page/TextEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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')
}
},
Expand Down

0 comments on commit cdfa483

Please sign in to comment.