Skip to content

Commit

Permalink
fix: support pressing Esc to close the CopyPasteModal
Browse files Browse the repository at this point in the history
  • Loading branch information
josdejong committed Mar 27, 2024
1 parent b0ba13f commit fb77efe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/components/modals/CopyPasteModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

<script lang="ts">
import { getContext } from 'svelte'
import { IS_MAC } from '../../utils/navigatorUtils.js'
import { IS_MAC } from '$lib/utils/navigatorUtils.js'
import { onEscape } from '$lib/actions/onEscape.js'
import Header from './Header.svelte'
import type { Context } from 'svelte-simple-modal'
Expand All @@ -11,7 +12,7 @@
const ctrl = IS_MAC ? '' : 'Ctrl'
</script>

<div class="jse-modal jse-copy-paste">
<div class="jse-modal jse-copy-paste" use:onEscape={() => close()}>
<Header title="Copying and pasting" />

<div class="jse-modal-contents">
Expand Down

0 comments on commit fb77efe

Please sign in to comment.