Skip to content

Commit

Permalink
fix(searchbar): disable shortcuts on focus
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreDemailly committed Jul 14, 2024
1 parent 21b8b0a commit dee1fd8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions public/components/searchbar/searchbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@ export class SearchBar {

this.container.addEventListener("click", () => this.open());

this.input.addEventListener("focus", () => {
window.disableShortcuts = true;
});

this.input.addEventListener("blur", () => {
window.disableShortcuts = false;
});

this.input.addEventListener("keyup", (event) => {
const shownPackages = document.querySelectorAll(".search-result-pannel > .package:not(.hide)");
const shownHelpers = document.querySelectorAll(".helpers > .line:not(.hide)");
Expand Down

0 comments on commit dee1fd8

Please sign in to comment.