mirror of
https://github.com/immich-app/immich.git
synced 2025-05-31 20:25:32 -04:00
fix(web): prevent comb box dropdowns from staying open when clicking on labels (#17119)
fix(web): prevent combobox dropdowns from staying open when clicking on label
This commit is contained in:
parent
6ba94ac2f2
commit
c547d849d9
@ -1,4 +1,6 @@
|
|||||||
<script lang="ts" module>
|
<script lang="ts" module>
|
||||||
|
import { get } from 'svelte/store';
|
||||||
|
|
||||||
export type ComboBoxOption = {
|
export type ComboBoxOption = {
|
||||||
id?: string;
|
id?: string;
|
||||||
label: string;
|
label: string;
|
||||||
@ -28,7 +30,6 @@
|
|||||||
import { generateId } from '$lib/utils/generate-id';
|
import { generateId } from '$lib/utils/generate-id';
|
||||||
import CircleIconButton from '$lib/components/elements/buttons/circle-icon-button.svelte';
|
import CircleIconButton from '$lib/components/elements/buttons/circle-icon-button.svelte';
|
||||||
import { t } from 'svelte-i18n';
|
import { t } from 'svelte-i18n';
|
||||||
import { get } from 'svelte/store';
|
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
label: string;
|
label: string;
|
||||||
@ -282,7 +283,6 @@
|
|||||||
class:cursor-pointer={!isActive}
|
class:cursor-pointer={!isActive}
|
||||||
class="immich-form-input text-sm text-left w-full !pr-12 transition-all"
|
class="immich-form-input text-sm text-left w-full !pr-12 transition-all"
|
||||||
id={inputId}
|
id={inputId}
|
||||||
onclick={activate}
|
|
||||||
onfocus={activate}
|
onfocus={activate}
|
||||||
oninput={onInput}
|
oninput={onInput}
|
||||||
role="combobox"
|
role="combobox"
|
||||||
@ -366,7 +366,7 @@
|
|||||||
aria-disabled={true}
|
aria-disabled={true}
|
||||||
class="text-left w-full px-4 py-2 hover:bg-gray-200 dark:hover:bg-gray-700 cursor-default aria-selected:bg-gray-200 aria-selected:dark:bg-gray-700"
|
class="text-left w-full px-4 py-2 hover:bg-gray-200 dark:hover:bg-gray-700 cursor-default aria-selected:bg-gray-200 aria-selected:dark:bg-gray-700"
|
||||||
id={`${listboxId}-${0}`}
|
id={`${listboxId}-${0}`}
|
||||||
onclick={() => closeDropdown()}
|
onclick={closeDropdown}
|
||||||
>
|
>
|
||||||
{allowCreate ? searchQuery : $t('no_results')}
|
{allowCreate ? searchQuery : $t('no_results')}
|
||||||
</li>
|
</li>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user