Skip to content

Commit e5e6bd4

Browse files
committed
Mother Fucker Search is Annoying Me
1 parent de7cce6 commit e5e6bd4

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

static/js/search-palette.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,13 @@
275275
return;
276276
}
277277
if (isOpen && isPaletteVisible()) {
278-
close({ force: true });
278+
if (input) {
279+
input.focus();
280+
if (query) {
281+
input.value = query;
282+
runSearch(query);
283+
}
284+
}
279285
return;
280286
}
281287
if (isOpen && !isPaletteVisible()) {
@@ -343,11 +349,7 @@
343349
e.preventDefault();
344350
e.stopPropagation();
345351
readScopeFromButton(openBtn);
346-
if (isOpen && isPaletteVisible()) {
347-
close({ force: true });
348-
} else {
349-
open('');
350-
}
352+
open('');
351353
return;
352354
}
353355
if (e.target.closest('[data-search-close]')) {

0 commit comments

Comments
 (0)