fix: stack arrow navigation when not directly navigating to an asset (#28828)

This commit is contained in:
Daniel Dietzler 2026-06-04 14:49:12 +02:00 committed by GitHub
parent de70d19d20
commit 4b0adb7a1e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -476,16 +476,18 @@
<CommandPaletteDefaultProvider name={$t('assets')} actions={[Tag, TagPeople]} />
<OnEvents {onAssetUpdate} />
<svelte:document bind:fullscreenElement />
<svelte:document
bind:fullscreenElement
use:shortcuts={[
{ shortcut: { key: 'ArrowUp' }, onShortcut: () => navigateStack('previous') },
{ shortcut: { key: 'ArrowDown' }, onShortcut: () => navigateStack('next') },
]}
/>
<section
id="immich-asset-viewer"
class="fixed inset-s-0 top-0 grid size-full grid-cols-4 grid-rows-[64px_1fr] overflow-hidden bg-black"
use:focusTrap
use:shortcuts={[
{ shortcut: { key: 'ArrowUp' }, onShortcut: () => navigateStack('previous') },
{ shortcut: { key: 'ArrowDown' }, onShortcut: () => navigateStack('next') },
]}
bind:this={assetViewerHtmlElement}
>
<!-- Top navigation bar -->