From: John Benediktsson Date: Sun, 25 Sep 2022 20:51:45 +0000 (-0700) Subject: help.html: prevent firefox quick find using '/' key X-Git-Tag: 0.99~1068 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=1ac3b1b74cf922ee5c3e51af266677141d37d892;ds=sidebyside help.html: prevent firefox quick find using '/' key --- diff --git a/basis/help/html/html.factor b/basis/help/html/html.factor index 4cd0f8c889..ce4c206eac 100644 --- a/basis/help/html/html.factor +++ b/basis/help/html/html.factor @@ -98,6 +98,7 @@ M: pathname url-of if (event.code == 'Slash') { let input = document.getElementById('search'); if (input !== document.activeElement) { + event.preventDefault(); setTimeout(function() { input.focus().select() }, 0); diff --git a/extra/webapps/help/search.js b/extra/webapps/help/search.js index b48c5771bb..db99569fc4 100644 --- a/extra/webapps/help/search.js +++ b/extra/webapps/help/search.js @@ -9,6 +9,7 @@ document.addEventListener('keydown', function (event) { if (event.code == 'Slash') { let input = document.getElementById('search'); if (input !== document.activeElement) { + event.preventDefault(); setTimeout(function() { input.focus().select() }, 0);