Skip to content

Commit

Permalink
Merge pull request #2 from trevortylerlee/add-esc-to-close-search
Browse files Browse the repository at this point in the history
Add "Esc" key functionality to close search dialog
  • Loading branch information
flo-bit authored Oct 27, 2024
2 parents acae147 + 8d9a6bb commit 33e8cd5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/search/CommandPalette.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@

event.preventDefault();
}

// close on escape
if (event.key === "Escape" && $showSearch) {
$showSearch = false;
}
}}
/>

Expand Down

0 comments on commit 33e8cd5

Please sign in to comment.