forked from MapComplete/MapComplete
UI: fix behaviour of hotkey "escape" when closing previews and nearby images popups
This commit is contained in:
parent
ae84207555
commit
e22929bb35
6 changed files with 73 additions and 49 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@
|
|||
<slot name="header" />
|
||||
</h1>
|
||||
{/if}
|
||||
<slot name="closebutton" />
|
||||
</svelte:fragment>
|
||||
<slot />
|
||||
{#if $$slots.footer}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue