Skip to content

Commit fe674bb

Browse files
sy-recordsderickr
authored andcommitted
Fix enhance keyboard navigation for search modal
1 parent 83b4688 commit fe674bb

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎public/js/search.js‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,12 @@ const initSearchModal = () => {
257257
document.addEventListener("keydown", (event) => {
258258
if (event.key === "/") {
259259
const gotoOverlay = document.getElementById("goto");
260-
if (gotoOverlay && getComputedStyle(gotoOverlay).display !== "none") {
260+
const gotoInput = gotoOverlay?.querySelector(".text");
261+
if (
262+
gotoOverlay &&
263+
getComputedStyle(gotoOverlay).display !== "none" &&
264+
event.target !== gotoInput
265+
) {
261266
event.preventDefault();
262267
event.stopImmediatePropagation();
263268
return;

0 commit comments

Comments
 (0)