feat: focus codemirror view when ImportCurl component launched (#3911)

Co-authored-by: jamesgeorge007 <jamesgeorge998001@gmail.com>
This commit is contained in:
Anwarul Islam
2024-03-22 18:51:16 +06:00
committed by GitHub
parent 6f4455ba03
commit 2c5b0dcd1b
2 changed files with 10 additions and 1 deletions

View File

@@ -98,6 +98,7 @@ import { RESTTabService } from "~/services/tab/rest"
import { useService } from "dioc/vue"
import { useNestedSetting } from "~/composables/settings"
import { toggleNestedSetting } from "~/newstore/settings"
import { EditorView } from "@codemirror/view"
const t = useI18n()
@@ -124,6 +125,7 @@ useCodemirror(
linter: null,
completer: null,
environmentHighlights: false,
onInit: (view: EditorView) => view.focus(),
})
)