Skip to content

Commit

Permalink
Expand on the Interactive Wordlist's functions and try to fix search …
Browse files Browse the repository at this point in the history
…focus
  • Loading branch information
kaubu committed Dec 17, 2023
1 parent ea95e05 commit 288c771
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/layouts/default/AppBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ function searchWord() {
onMounted(() => {
const searchBar = document.getElementById("searchBar");
const wordlistSearch = document.getElementById("wordlistSearch");
// const wordlistSearch = document.getElementById("wordlistSearch");
window.addEventListener("keyup", (e) => {
// If the key is pressed and it is not focused
if (e.code === "KeyS"
&& (document.activeElement !== searchBar)
&& (document.activeElement !== wordlistSearch)) {
&& (document.activeElement?.id !== "wordlistSearch")) {
console.log(`Focusing search! activeElement = ${document.activeElement?.id}`);
searchBar?.focus();
// Unfocus the search bar if escape is pressed
Expand Down
3 changes: 3 additions & 0 deletions src/views/Wordlist.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@

<p>You cannot, however, search in two columns at once.</p>

<p>You can sort multiple columns at a time. Each column will have a
number at the side which indicates the order in which is sorts.</p>

<p>This wordlist automatically limits itself to 10 words at a time
(due to processing lag), but this can be controlled at the very
bottom with the "Items per page" dropdown selector.</p>
Expand Down

0 comments on commit 288c771

Please sign in to comment.