Skip to content

Commit

Permalink
feat(default-editor): auto focus editor when document changed
Browse files Browse the repository at this point in the history
purocean committed Nov 29, 2022
1 parent 0f180b2 commit d81968a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/renderer/components/DefaultEditor.vue
Original file line number Diff line number Diff line change
@@ -104,6 +104,11 @@ export default defineComponent({
getEditor().updateOptions({
readOnly: !current || !current.plain
})
if (getIsDefault()) {
await nextTick()
getEditor().focus()
}
}
function resize () {

0 comments on commit d81968a

Please sign in to comment.