diff --git a/apps/app/components/issues/modal.tsx b/apps/app/components/issues/modal.tsx index c69faa0eb..28689e6cd 100644 --- a/apps/app/components/issues/modal.tsx +++ b/apps/app/components/issues/modal.tsx @@ -75,6 +75,19 @@ export const CreateUpdateIssueModal: React.FC = ({ setActiveProject(projects?.find((p) => p.id === projectId)?.id ?? projects?.[0].id ?? null); }, [projectId, projects]); + useEffect(() => { + const handleKeyDown = (e: KeyboardEvent) => { + if (e.key === "Escape") { + handleClose(); + } + }; + + window.addEventListener("keydown", handleKeyDown); + return () => { + window.removeEventListener("keydown", handleKeyDown); + }; + }, []); + const addIssueToCycle = async (issueId: string, cycleId: string) => { if (!workspaceSlug || !projectId) return;