Skip to content

Commit d301d6b

Browse files
feat: close search dialog with ctrl+f (#1807)
* feat: close search dialog with ctrl+f * format
1 parent 68291d5 commit d301d6b

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/handlers/quickTools.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,12 @@ function setupHistoryNavigation() {
8383
// Search input history navigation
8484
if ($searchInput.el) {
8585
$searchInput.el.addEventListener("keydown", (e) => {
86-
if (e.key === "ArrowUp") {
86+
if ((e.ctrlKey || e.metaKey) && e.key.toLowerCase() === "f") {
87+
e.preventDefault();
88+
const { editor, activeFile } = editorManager;
89+
editor.focus();
90+
toggleSearch();
91+
} else if (e.key === "ArrowUp") {
8792
e.preventDefault();
8893
const newValue = searchHistory.navigateSearchUp($searchInput.el.value);
8994
$searchInput.el.value = newValue;

0 commit comments

Comments
 (0)