Skip to content

Commit 5770596

Browse files
committed
fix: use correct class docsearch--active
1 parent c46371c commit 5770596

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

.changes/class-open-typo.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"meilisearch-docsearch": "patch"
3+
---
4+
5+
Use correct `docsearch--active` to determine if the modal is open, instead of `DocSearch--active`

src/useDocSearchHotKeys.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export function useDocSearchHotKeys({
3535
e.preventDefault();
3636
if (isOpen()) {
3737
onClose();
38-
} else if (!document.body.classList.contains("DocSearch--active")) {
38+
} else if (!document.body.classList.contains("docsearch--active")) {
3939
// We check that no other DocSearch modal is showing before opening
4040
// another one.
4141
const selectedText = window.getSelection();

0 commit comments

Comments
 (0)