1
0
mirror of https://github.com/immich-app/immich.git synced 2025-09-16 09:36:54 +02:00

fix(web): keyboard event propagation in modals (#9713)

* fix: key events propagating from modal, visible close button focus

* feat: set initial focus on the text field for album creation

* chore: step back duplicated changes
This commit is contained in:
Ben
2024-05-26 21:43:30 +00:00
committed by GitHub
parent 4d4bb8b6a7
commit 9628ea2d24

View File

@@ -43,13 +43,16 @@
}
</script>
<FocusTrap>
<section
role="presentation"
in:fade={{ duration: 100 }}
out:fade={{ duration: 100 }}
class="fixed left-0 top-0 z-[9990] flex h-screen w-screen place-content-center place-items-center bg-black/40"
>
<section
role="presentation"
in:fade={{ duration: 100 }}
out:fade={{ duration: 100 }}
class="fixed left-0 top-0 z-[9990] flex h-screen w-screen place-content-center place-items-center bg-black/40"
on:keydown={(event) => {
event.stopPropagation();
}}
>
<FocusTrap>
<div
class="z-[9999] max-w-[95vw] max-h-[95vh] {modalWidth} overflow-y-auto rounded-3xl bg-immich-bg shadow-md dark:bg-immich-dark-gray dark:text-immich-dark-fg immich-scrollbar"
style="max-height: min(95vh, 900px);"
@@ -72,5 +75,5 @@
</div>
{/if}
</div>
</section>
</FocusTrap>
</FocusTrap>
</section>