diff --git a/pages.json b/pages.json index 8fd9ae0..e0fa45d 100644 --- a/pages.json +++ b/pages.json @@ -6,5 +6,6 @@ {"title":"GitHub", "link": "https://github.com/lambdapaul"}, {"title":"GitLab", "link": "https://gitlab.com/lambdapaul"}, {"title":"Mastodon", "link": "https://mastodon.social/@lambdapaul"}, + {"title":"Matrix", "link": "https://matrix.to/#/@lambdapaul:matrix.org"}, {"title":"Keybase", "link": "https://keybase.io/lambdapaul"} ] \ No newline at end of file diff --git a/scripts/fuzzy.js b/scripts/fuzzy.js index 76054a1..89eb821 100644 --- a/scripts/fuzzy.js +++ b/scripts/fuzzy.js @@ -77,7 +77,7 @@ function fuzzyInit(pagesFileName) { } ); - document.body.addEventListener("keyup", (e) => { + document.body.addEventListener("keydown", (e) => { if (e.code === "ArrowDown" || e.code === "ArrowUp") { if (resultBlock.childNodes === null) return; @@ -90,6 +90,7 @@ function fuzzyInit(pagesFileName) { let currNode = document.activeElement; if (searchField === currNode) { + e.preventDefault(); if (e.code === "ArrowDown") resultNodes[0].focus(); else @@ -100,6 +101,7 @@ function fuzzyInit(pagesFileName) { if (Array.from(resultNodes).indexOf(currNode) < 0) return; + e.preventDefault(); if (e.code === "ArrowDown") if (currNode.nextElementSibling === null) searchField.focus();