diff options
| -rw-r--r-- | layouts/partials/components/global-search.html | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/layouts/partials/components/global-search.html b/layouts/partials/components/global-search.html index 9311416d..5b158abe 100644 --- a/layouts/partials/components/global-search.html +++ b/layouts/partials/components/global-search.html @@ -106,9 +106,15 @@ } }); + // trigger by clicking instruction text + // to allow mobile users to search const searchInstruction = document.getElementById("search-instruction"); if (searchInstruction) { searchInstruction.addEventListener("click", turnOn); } + + // double-click to turn off search + // in case esc and ctrl/cmd+k cannot be used + search.addEventListener("dblclick", turnOff); })(); </script> |
