[web-php] master: Fix enhance keyboard navigation for search modal
| From: | Luffy via Derick Rethans | Date: | Thu, 12 Nov 2026 14:46:24 +0000 |
| Subject: | [web-php] master: Fix enhance keyboard navigation for search modal | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-34178@lists.php.net to get a copy of this message | ||
Author: Luffy (sy-records)
Committer: Derick Rethans (derickr)
Date: 2026-11-12T14:46:17Z
Commit: https://github.com/php/web-php/commit/fe674bb99c3a7116a903633e4cd669d44cc1ffa2
Raw diff: https://github.com/php/web-php/commit/fe674bb99c3a7116a903633e4cd669d44cc1ffa2.diff
Fix enhance keyboard navigation for search modal
Changed paths:
M public/js/search.js
Diff:
diff --git a/public/js/search.js b/public/js/search.js
index 0411c48345..a7039638f0 100644
--- a/public/js/search.js
+++ b/public/js/search.js
@@ -257,7 +257,12 @@ const initSearchModal = () => {
document.addEventListener("keydown", (event) => {
if (event.key === "/") {
const gotoOverlay = document.getElementById("goto");
- if (gotoOverlay && getComputedStyle(gotoOverlay).display !== "none")
{
+ const gotoInput = gotoOverlay?.querySelector(".text");
+ if (
+ gotoOverlay &&
+ getComputedStyle(gotoOverlay).display !== "none" &&
+ event.target !== gotoInput
+ ) {
event.preventDefault();
event.stopImmediatePropagation();
return;