UI: fix behaviour of hotkey "escape" when closing previews and nearby images popups

This commit is contained in:
Pieter Vander Vennet 2025-03-13 16:53:12 +01:00
parent ae84207555
commit e22929bb35
6 changed files with 73 additions and 49 deletions

View file

@ -14,6 +14,8 @@ export default class Hotkeys {
}[]
> = new UIEventSource([])
private static readonly seenKeys: Set<string> = new Set()
/**
* Register a hotkey
* @param key
@ -51,6 +53,9 @@ export default class Hotkeys {
}
}
const keyString = JSON.stringify(key)
this.seenKeys.add(keyString)
this._docs.data.push({ key, documentation, alsoTriggeredBy })
this._docs.ping()
if (Utils.runningFromConsole) {

View file

@ -56,6 +56,7 @@
<slot name="header" />
</h1>
{/if}
<slot name="closebutton" />
</svelte:fragment>
<slot />
{#if $$slots.footer}