]> gitweb.factorcode.org Git - factor.git/commitdiff
help.html: prevent firefox quick find using '/' key
authorJohn Benediktsson <mrjbq7@gmail.com>
Sun, 25 Sep 2022 20:51:45 +0000 (13:51 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sun, 25 Sep 2022 20:51:45 +0000 (13:51 -0700)
basis/help/html/html.factor
extra/webapps/help/search.js

index 4cd0f8c889da55ad40ea890a9f3b1dd952f45038..ce4c206eaca45d8872154eb498ebbbfbe04bd7d3 100644 (file)
@@ -98,6 +98,7 @@ M: pathname url-of
             if (event.code == 'Slash') {
                 let input = document.getElementById('search');
                 if (input !== document.activeElement) {
             if (event.code == 'Slash') {
                 let input = document.getElementById('search');
                 if (input !== document.activeElement) {
+                    event.preventDefault();
                     setTimeout(function() {
                         input.focus().select()
                     }, 0);
                     setTimeout(function() {
                         input.focus().select()
                     }, 0);
index b48c5771bb27507009c4c25c6ba39b4e712912bb..db99569fc4e834bd9bccfa455f364855936f3ec2 100644 (file)
@@ -9,6 +9,7 @@ document.addEventListener('keydown', function (event) {
     if (event.code == 'Slash') {
         let input = document.getElementById('search');
         if (input !== document.activeElement) {
     if (event.code == 'Slash') {
         let input = document.getElementById('search');
         if (input !== document.activeElement) {
+            event.preventDefault();
             setTimeout(function() {
                 input.focus().select()
             }, 0);
             setTimeout(function() {
                 input.focus().select()
             }, 0);