Skip to content

Commit

Permalink
feat: focus codemirror view when import curl modal launch
Browse files Browse the repository at this point in the history
  • Loading branch information
anwarulislam authored and jamesgeorge007 committed Mar 22, 2024
1 parent 85506d8 commit 0a28d58
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/hoppscotch-common/src/components/http/ImportCurl.vue
Expand Up @@ -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()
Expand All @@ -124,9 +125,14 @@ useCodemirror(
linter: null,
completer: null,
environmentHighlights: false,
onInit: onInitView,
})
)
function onInitView(view: EditorView) {
view.focus()
}
watch(
() => props.show,
() => {
Expand Down

0 comments on commit 0a28d58

Please sign in to comment.