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 <[email protected]>
  • Loading branch information
mejo- committed Oct 10, 2023
1 parent f43d082 commit 0ca040f
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 @@ -227,20 +227,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 @@ -249,10 +236,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 0ca040f

Please sign in to comment.