Skip to content

Commit

Permalink
Allow "/" when editing code (#1177)
Browse files Browse the repository at this point in the history
Co-authored-by: Luffy <[email protected]>
  • Loading branch information
soyuka and sy-records authored Dec 4, 2024
1 parent 621bcce commit 543eab7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,10 @@ const initSearchModal = () => {

// Open when / is pressed
document.addEventListener("keydown", (event) => {
if (event.target.contentEditable === "true") {
return;
}

if (event.key === "/") {
show();
event.preventDefault();
Expand Down

0 comments on commit 543eab7

Please sign in to comment.