diff options
| author | ivarlovlie <git@ivarlovlie.no> | 2022-06-03 00:57:17 +0200 |
|---|---|---|
| committer | ivarlovlie <git@ivarlovlie.no> | 2022-06-03 00:57:17 +0200 |
| commit | 5b5b4c888ac08163edd13c698037120df8bd8768 (patch) | |
| tree | 3b6a028fb4272b2fe64af85ad6894fa44509c077 /apps/web-shared/src/components/dropdown.svelte | |
| parent | bac386057a990200112b136674933b0220ac0ea8 (diff) | |
| download | greatoffice-5b5b4c888ac08163edd13c698037120df8bd8768.tar.xz greatoffice-5b5b4c888ac08163edd13c698037120df8bd8768.zip | |
fix: !WIP flickering dropdown on multi dropdowns with new focus strategy
Diffstat (limited to 'apps/web-shared/src/components/dropdown.svelte')
| -rw-r--r-- | apps/web-shared/src/components/dropdown.svelte | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/web-shared/src/components/dropdown.svelte b/apps/web-shared/src/components/dropdown.svelte index 2cddce9..d53bb6e 100644 --- a/apps/web-shared/src/components/dropdown.svelte +++ b/apps/web-shared/src/components/dropdown.svelte @@ -225,7 +225,6 @@ } else { document.querySelector("#" + INTERNAL_ID + " ul li:first-of-type").classList.add("focus"); document.querySelector("#" + INTERNAL_ID + " ul li:first-of-type").scrollIntoView(); - } } else if (arrowUpPressed) { if (focusedEntry.previousElementSibling) { @@ -280,6 +279,11 @@ > <!-- input --> <div class="select-auto__input-wrapper form-control" + style="cursor: text" + on:click={() => { + if (!element_has_focus(searchInputNode)) searchInputNode.focus(); + showDropdown = true; + }} class:multiple={multiple === true} class:has-selection={hasSelection}> {#if multiple === true && hasSelection} |
