From c547d849d921d353cf250f2e2236c298768df1eb Mon Sep 17 00:00:00 2001
From: Snowknight26 <Snowknight26@users.noreply.github.com>
Date: Wed, 26 Mar 2025 08:58:00 -0500
Subject: [PATCH] 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
---
 web/src/lib/components/shared-components/combobox.svelte | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/web/src/lib/components/shared-components/combobox.svelte b/web/src/lib/components/shared-components/combobox.svelte
index a6a1422eef..c2284ebb0c 100644
--- a/web/src/lib/components/shared-components/combobox.svelte
+++ b/web/src/lib/components/shared-components/combobox.svelte
@@ -1,4 +1,6 @@
 <script lang="ts" module>
+  import { get } from 'svelte/store';
+
   export type ComboBoxOption = {
     id?: string;
     label: string;
@@ -28,7 +30,6 @@
   import { generateId } from '$lib/utils/generate-id';
   import CircleIconButton from '$lib/components/elements/buttons/circle-icon-button.svelte';
   import { t } from 'svelte-i18n';
-  import { get } from 'svelte/store';
 
   interface Props {
     label: string;
@@ -282,7 +283,6 @@
       class:cursor-pointer={!isActive}
       class="immich-form-input text-sm text-left w-full !pr-12 transition-all"
       id={inputId}
-      onclick={activate}
       onfocus={activate}
       oninput={onInput}
       role="combobox"
@@ -366,7 +366,7 @@
           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"
           id={`${listboxId}-${0}`}
-          onclick={() => closeDropdown()}
+          onclick={closeDropdown}
         >
           {allowCreate ? searchQuery : $t('no_results')}
         </li>