mirror of
https://github.com/purocean/yn.git
synced 2026-09-24 15:46:02 +08:00
feat(default-editor): auto focus editor when document changed
This commit is contained in:
@@ -104,6 +104,11 @@ export default defineComponent({
|
||||
getEditor().updateOptions({
|
||||
readOnly: !current || !current.plain
|
||||
})
|
||||
|
||||
if (getIsDefault()) {
|
||||
await nextTick()
|
||||
getEditor().focus()
|
||||
}
|
||||
}
|
||||
|
||||
function resize () {
|
||||
|
||||
Reference in New Issue
Block a user