fix: broken expandableimage handling
This commit is contained in:
2 files changed
+17
-2
No files matched your search
@@ -30,18 +30,20 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<svelte:body
|
<svelte:body
|
||||||
onclick={() => history.back()}
|
|
||||||
onkeydown={e => {
|
onkeydown={e => {
|
||||||
if (e.key == 'Escape') history.back()
|
if (e.key == 'Escape' && page.state.openImage != '') history.back()
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{#if page.state.openImage || '' != ''}
|
{#if page.state.openImage || '' != ''}
|
||||||
|
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
||||||
|
<!-- svelte-ignore a11y_no_static_element_interactions -->
|
||||||
<div
|
<div
|
||||||
class="fixed top-0 left-0 w-screen h-svh overflow-auto bg-white/50 dark:bg-black/50
|
class="fixed top-0 left-0 w-screen h-svh overflow-auto bg-white/50 dark:bg-black/50
|
||||||
flex flex-col z-100 backdrop-blur-xs"
|
flex flex-col z-100 backdrop-blur-xs"
|
||||||
transition:fade={{ duration: 150 }}
|
transition:fade={{ duration: 150 }}
|
||||||
use:focusTrap
|
use:focusTrap
|
||||||
|
onclick={() => history.back()}
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
width={800}
|
width={800}
|
||||||
|
|||||||
@@ -119,6 +119,13 @@ interface Settings {
|
|||||||
save: Keybind
|
save: Keybind
|
||||||
expand: Keybind
|
expand: Keybind
|
||||||
}
|
}
|
||||||
|
|
||||||
|
comments: {
|
||||||
|
next: Keybind
|
||||||
|
previous: Keybind
|
||||||
|
upvote: Keybind
|
||||||
|
downvote: Keybind
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -210,6 +217,12 @@ export const defaultSettings: Settings = {
|
|||||||
save: { ctrl: true, key: 's' },
|
save: { ctrl: true, key: 's' },
|
||||||
expand: { ctrl: false, key: 'h' },
|
expand: { ctrl: false, key: 'h' },
|
||||||
},
|
},
|
||||||
|
comments: {
|
||||||
|
next: { ctrl: false, key: 'k' },
|
||||||
|
previous: { ctrl: false, key: 'j' },
|
||||||
|
upvote: { ctrl: false, key: 'n' },
|
||||||
|
downvote: { ctrl: false, key: 'm' },
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user