We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
autofocus
UModal
v2.18.7
<UModal v-model="isOpen" class="mx-auto max-w-xs sm:max-w-[425px] md:max-w-[600px] lg:max-w-[800px] xl:max-w-[1000px]" > <UCard> <template #header> <h3 class="text-xl font-bold text-gray-900 dark:text-white">Supported Languages</h3> <p>Taknotes supports 50+ languages for recording & transcriptions</p> </template> <template #default> <div> <div class="relative mb-4"> <UInput v-model="search" placeholder="Search languages..." :autofocus="false" /> </div> <div class="h-[300px] overflow-y-auto md:h-[400px] lg:h-[500px]"> <div class="grid grid-cols-2 gap-4 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 xl:grid-cols-6"> <div v-for="lang in filteredLanguages" :key="lang.id" class="bg-background flex flex-col items-center justify-center rounded-md border p-2"> <span class="mb-1 text-3xl" role="img" :aria-label="`Flag of ${lang.name}`">{{ lang.flag }}</span> <span class="text-center text-xs">{{ lang.name }}</span> </div> </div> </div> </div> </template> <template #footer> <UButton color="accent" size="xl" block @click="handleCtaAction">{{ ctaText }}</UButton> </template> </UCard> </UModal>
(Need to remove the v-for)
v-for
When the modal is opened, the input is automatically focused even if set to false
false
It would be good to have it respect the property
The only fix I found is to add a timeout of 1ms when the modal is mounted
<UInput v-if="showSearch" v-model="search" placeholder="Search languages..." :autofocus="false" />
onMounted(() => { setTimeout(() => { showSearch.value = true; }, 1); });
No response
The text was updated successfully, but these errors were encountered:
I have the same situation in Slideover where the first input is focused.
Sorry, something went wrong.
No branches or pull requests
Environment
Version
v2.18.7
Reproduction
(Need to remove the
v-for
)Description
When the modal is opened, the input is automatically focused even if set to
false
It would be good to have it respect the property
The only fix I found is to add a timeout of 1ms when the modal is mounted
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: