Skip to content

Commit 3de91af

Browse files
authored
Merge pull request #74 from PentabyteDevAlign/refactor
ref: click outside cant close dialog task kanban
2 parents 6f548d2 + 544f999 commit 3de91af

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

Frontend/src/components/kanban/Column.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,11 @@ const Column = ({
318318
Add Task
319319
</Button>
320320
</DialogTrigger>
321-
<DialogContent className="sm:max-w-[425px]">
321+
<DialogContent
322+
className="sm:max-w-[425px]"
323+
onInteractOutside={(e) => e.preventDefault()}
324+
onEscapeKeyDown={(e) => e.preventDefault()}
325+
>
322326
<DialogHeader>
323327
<DialogTitle>Add New Task</DialogTitle>
324328
</DialogHeader>

Frontend/src/components/kanban/TaskCard.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,11 @@ const TaskCard = ({ task, projectId }) => {
234234
}
235235
}}
236236
>
237-
<DialogContent className="max-w-lg">
237+
<DialogContent
238+
className="max-w-lg"
239+
onInteractOutside={(e) => e.preventDefault()}
240+
onEscapeKeyDown={(e) => e.preventDefault()}
241+
>
238242
<DialogHeader>
239243
<DialogTitle className="flex justify-between items-center">
240244
{isEditing ? "Edit Task" : task.title}

0 commit comments

Comments
 (0)