Skip to content

Commit

Permalink
Fix storing recent search when using keyboard (#454)
Browse files Browse the repository at this point in the history
Initially I implemented a custom event to achieve this, but in the end,
simply using `click` event seemed like a much cleaner solution.

Closes #399
  • Loading branch information
zanderle authored Dec 2, 2024
1 parent 5bea3e1 commit 505181d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ export class SearchElement extends LitElement {
const selected = this.renderRoot.querySelector("a.hit.active");
// if an item is selected, then redirect to its link
if (selected !== null) {
window.location.href = selected.href;
selected.click();
}
}

Expand Down

0 comments on commit 505181d

Please sign in to comment.