diff --git a/client/src/components/Upload/DefaultRow.vue b/client/src/components/Upload/DefaultRow.vue index 921b1e0c7f65..396fcb2deae6 100644 --- a/client/src/components/Upload/DefaultRow.vue +++ b/client/src/components/Upload/DefaultRow.vue @@ -3,7 +3,7 @@ import { library } from "@fortawesome/fontawesome-svg-core"; import { faEdit, faFolderOpen, faLaptop } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; import { bytesToString } from "utils/utils"; -import { computed } from "vue"; +import { computed, onMounted, ref } from "vue"; import UploadExtension from "./UploadExtension.vue"; import UploadSelect from "./UploadSelect.vue"; @@ -11,6 +11,8 @@ import UploadSettings from "./UploadSettings.vue"; library.add(faEdit, faLaptop, faFolderOpen); +const fileField = ref(null); + const props = defineProps({ deferred: { type: Boolean, @@ -104,6 +106,14 @@ function removeUpload() { emit("remove", props.index); } } + +onMounted(() => { + autoSelectFileInput(); +}); + +function autoSelectFileInput() { + fileField.value.select(); +}