Skip to content

Commit

Permalink
Merge branch 'main' into clear-deprecated-content
Browse files Browse the repository at this point in the history
  • Loading branch information
ankur-arch authored Mar 6, 2025
2 parents b7047e1 + 5fa7e15 commit ca74f2b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/theme/Layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,19 @@ export default function Layout(props: Props): ReactNode {
localStorage.setItem("utm_params", currentParams.toString());
}
}, [location, history]);

useEffect(() => {
const handleKeyDown = (event: KeyboardEvent) => {
const isKapaModalOpen = document.querySelector('#__docusaurus[aria-hidden="true"]');
if (isKapaModalOpen && event.key === "/") {
event.stopPropagation();
}
};
document.addEventListener("keydown", handleKeyDown, true);
return () => {
document.removeEventListener("keydown", handleKeyDown, true);
};
}, []);

return (
<LayoutProvider>
Expand Down

0 comments on commit ca74f2b

Please sign in to comment.