Author: Antoine Bluchet (soyuka)
Committer: GitHub (web-flow)
Pusher: sy-records
Date: 2024-12-04T15:16:25+08:00

Commit: 
https://github.com/php/web-php/commit/543eab70a4aa940839c238fbcfef35ad288f22bc
Raw diff: 
https://github.com/php/web-php/commit/543eab70a4aa940839c238fbcfef35ad288f22bc.diff

Allow "/" when editing code (#1177)

Co-authored-by: Luffy <lu...@php.net>

Changed paths:
  M  js/search.js


Diff:

diff --git a/js/search.js b/js/search.js
index ec4ef8fb6c..1cc5447de9 100644
--- a/js/search.js
+++ b/js/search.js
@@ -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();

Reply via email to