mirror of
https://github.com/immich-app/immich.git
synced 2025-01-21 00:52:43 -05: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:
parent
4d4bb8b6a7
commit
9628ea2d24
1 changed files with 12 additions and 9 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Reference in a new issue