diff --git a/web/components/issues/peek-overview/view.tsx b/web/components/issues/peek-overview/view.tsx index fc90dc85a..fbe4d01a5 100644 --- a/web/components/issues/peek-overview/view.tsx +++ b/web/components/issues/peek-overview/view.tsx @@ -4,6 +4,7 @@ import { observer } from "mobx-react-lite"; import { MoveRight, MoveDiagonal, Link2, Trash2 } from "lucide-react"; // hooks import useOutsideClickDetector from "hooks/use-outside-click-detector"; +import useKeypress from "hooks/use-keypress"; // store hooks import { useIssueDetail, useUser } from "hooks/store"; import useToast from "hooks/use-toast"; @@ -99,6 +100,9 @@ export const IssueView: FC = observer((props) => { }); }; + const handleKeyDown = () => !isAnyModalOpen && removeRoutePeekId(); + useKeypress("Escape", handleKeyDown); + return ( <> {issue && !is_archived && (