Skip to content

Commit

Permalink
fix: use correct class docsearch--active
Browse files Browse the repository at this point in the history
  • Loading branch information
amrbashir committed Feb 7, 2023
1 parent c46371c commit 5770596
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changes/class-open-typo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"meilisearch-docsearch": "patch"
---

Use correct `docsearch--active` to determine if the modal is open, instead of `DocSearch--active`
2 changes: 1 addition & 1 deletion src/useDocSearchHotKeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export function useDocSearchHotKeys({
e.preventDefault();
if (isOpen()) {
onClose();
} else if (!document.body.classList.contains("DocSearch--active")) {
} else if (!document.body.classList.contains("docsearch--active")) {
// We check that no other DocSearch modal is showing before opening
// another one.
const selectedText = window.getSelection();
Expand Down

0 comments on commit 5770596

Please sign in to comment.