Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -308,26 +308,14 @@
/>
</div>

<div class="absolute inset-y-0 {showClearIcon ? 'end-14' : 'end-2'} flex items-center ps-6 transition-all">
<IconButton
aria-label={$t('show_search_options')}
shape="round"
icon={mdiTune}
onclick={onFilterClick}
size="medium"
color="secondary"
variant="ghost"
/>
</div>

{#if searchStore.isSearchEnabled}
<div
id={searchTypeId}
class="absolute inset-y-0 flex items-center end-16"
class:max-md:hidden={value}
class:end-28={value.length > 0}
>
<div class="relative">
<div class="relative" use:focusOutside={{ onFocusOut: closeSearchTypeDropdown }}>
<Button
class="bg-immich-primary text-white dark:bg-immich-dark-primary/90 dark:text-black/75 rounded-full px-3 py-1 text-xs hover:opacity-80 transition-opacity cursor-pointer"
onclick={toggleSearchTypeDropdown}
Expand All @@ -340,11 +328,11 @@
{#if showSearchTypeDropdown}
<div
class="absolute top-full right-0 mt-1 bg-white dark:bg-immich-dark-gray border border-gray-200 dark:border-gray-600 rounded-lg shadow-lg py-1 min-w-32 z-9999"
use:focusOutside={{ onFocusOut: closeSearchTypeDropdown }}
>
{#each searchTypes as searchType (searchType.value)}
<button
type="button"
tabindex="0"
Copy link

Copilot AI Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tabindex="0" attribute is redundant for button elements, as they are naturally focusable. This attribute is only needed for non-interactive elements like divs or spans that need to be focusable. While this doesn't cause any issues, it can be removed for cleaner code.

Suggested change
tabindex="0"

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

@LeLunZ LeLunZ Dec 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In safari it's not working without the tabindex attribute. When pressing tab, it just skips the whole dropdown.

And: When removing the tabindex attribute, in combination with the changes in the PR, the onClick action doesn't seem to run through anymore (but thats only in safari, and in chrome/firefox it works... really weird)

class="w-full text-left px-3 py-2 text-xs hover:bg-gray-100 dark:hover:bg-gray-700 transition-colors
{currentSearchType === searchType.value ? 'bg-gray-100 dark:bg-gray-700' : ''}"
onclick={() => selectSearchType(searchType.value)}
Expand All @@ -358,6 +346,18 @@
</div>
{/if}

<div class="absolute inset-y-0 {showClearIcon ? 'end-14' : 'end-2'} flex items-center ps-6 transition-all">
<IconButton
aria-label={$t('show_search_options')}
shape="round"
icon={mdiTune}
onclick={onFilterClick}
size="medium"
color="secondary"
variant="ghost"
/>
</div>

{#if showClearIcon}
<div class="absolute inset-y-0 end-0 flex items-center pe-2">
<IconButton
Expand Down
Loading