From 9fd73873b676f3bdd6fe84f16f2fa43357612da7 Mon Sep 17 00:00:00 2001 From: bymyself Date: Wed, 12 Feb 2025 08:02:42 -0700 Subject: [PATCH] [Desktop] Re-run path validation when re-focusing installation location input (#2528) --- src/components/install/InstallLocationPicker.vue | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/components/install/InstallLocationPicker.vue b/src/components/install/InstallLocationPicker.vue index bfd330cf5..3efa0b359 100644 --- a/src/components/install/InstallLocationPicker.vue +++ b/src/components/install/InstallLocationPicker.vue @@ -17,6 +17,7 @@ class="w-full" :class="{ 'p-invalid': pathError }" @update:modelValue="validatePath" + @focus="onFocus" /> ('pathError', { required: true }) const pathExists = ref(false) const appData = ref('') const appPath = ref('') +const inputTouched = ref(false) const electron = electronAPI() @@ -132,4 +134,13 @@ const browsePath = async () => { pathError.value = t('install.failedToSelectDirectory') } } + +const onFocus = () => { + if (!inputTouched.value) { + inputTouched.value = true + return + } + // Refresh validation on re-focus + validatePath(installPath.value) +}