Skip to content

⭐️⭐️⭐️ Open-source, self-hosted alternative to Linear and Plane. Project management and issue tracking where teams and AI agents work side by side to plan and ship products.

fix(web): open the issue every card and row click asks for (#309)

Croff6f0647dfdddf
diff --git a/apps/web/src/features/initiatives/components/detail/InitiativeActiveWork.tsx b/apps/web/src/features/initiatives/components/detail/InitiativeActiveWork.tsx
index f8df9b77..f7fb4af1 100644
--- a/apps/web/src/features/initiatives/components/detail/InitiativeActiveWork.tsx
+++ b/apps/web/src/features/initiatives/components/detail/InitiativeActiveWork.tsx
@@ -43,7 +43,10 @@ export default function InitiativeActiveWork({
<li key={issue.id} className="border-border not-last:border-b">
<button
type="button"
- onClick={() => onOpenIssue(issue.id)}
+ onClick={(e) => {
+ e.preventDefault();
+ onOpenIssue(issue.id);
+ }}
className="flex w-full items-center gap-2.5 px-3 py-2 text-left text-sm hover:bg-muted/50"
>
{column && (
diff --git a/apps/web/src/features/work-items/components/kanban/IssueCardLinks.tsx b/apps/web/src/features/work-items/components/kanban/IssueCardLinks.tsx
index 0d36107b..59c14d28 100644
--- a/apps/web/src/features/work-items/components/kanban/IssueCardLinks.tsx
+++ b/apps/web/src/features/work-items/components/kanban/IssueCardLinks.tsx
@@ -51,6 +51,7 @@ export function IssueCardLinks({
onPointerDown={(e) => e.stopPropagation()}
onClick={(e) => {
e.stopPropagation();
+ e.preventDefault();
onOpen?.(link.issue.id);
}}
className={cn(
diff --git a/apps/web/src/features/work-items/components/kanban/IssueCardSubtasks.tsx b/apps/web/src/features/work-items/components/kanban/IssueCardSubtasks.tsx
index 019c05ec..c9169374 100644
--- a/apps/web/src/features/work-items/components/kanban/IssueCardSubtasks.tsx
+++ b/apps/web/src/features/work-items/components/kanban/IssueCardSubtasks.tsx
@@ -44,6 +44,7 @@ export function IssueCardSubtasks({
onPointerDown={(e) => e.stopPropagation()}
onClick={(e) => {
e.stopPropagation();
+ e.preventDefault();
onOpen?.(subtask.id);
}}
className={cn(
diff --git a/apps/web/src/features/work-items/components/shared/IssueIdentifier.tsx b/apps/web/src/features/work-items/components/shared/IssueIdentifier.tsx
index 4fd09a43..7b4e9243 100644
--- a/apps/web/src/features/work-items/components/shared/IssueIdentifier.tsx
+++ b/apps/web/src/features/work-items/components/shared/IssueIdentifier.tsx
@@ -32,6 +32,7 @@ export function IssueIdentifier({
onPointerDown={(e) => e.stopPropagation()}
onClick={(e) => {
e.stopPropagation();
+ e.preventDefault();
onOpenParent?.(parent.id);
}}
className={cn(
diff --git a/apps/web/src/features/work-items/components/table/TableRow.tsx b/apps/web/src/features/work-items/components/table/TableRow.tsx
index 019a1b5a..3c8c8e26 100644
--- a/apps/web/src/features/work-items/components/table/TableRow.tsx
+++ b/apps/web/src/features/work-items/components/table/TableRow.tsx
@@ -83,7 +83,10 @@ export function TableRow({
ref={mergedRef}
{...attributes}
{...listeners}
- onClick={onClick}
+ onClick={(e) => {
+ e.preventDefault();
+ onClick();
+ }}
className={cn(
'relative grid cursor-grab gap-3 border-b py-2 pr-4 text-sm transition-colors sm:touch-none',
isBlocked(issue) ? 'row-blocked' : 'hover:bg-accent/40',
diff --git a/apps/web/src/features/work-items/components/table/TableRowLinks.tsx b/apps/web/src/features/work-items/components/table/TableRowLinks.tsx
index 697899a7..08097bd2 100644
--- a/apps/web/src/features/work-items/components/table/TableRowLinks.tsx
+++ b/apps/web/src/features/work-items/components/table/TableRowLinks.tsx
@@ -42,6 +42,7 @@ export function TableRowLinks({
className="flex min-w-0 items-center gap-2 rounded py-0.5 text-left text-xs text-muted-foreground hover:text-foreground"
onClick={(e) => {
e.stopPropagation();
+ e.preventDefault();
onOpenIssue(link.issue.id);
}}
>
diff --git a/apps/web/src/features/work-items/components/table/TableRowSubtasks.tsx b/apps/web/src/features/work-items/components/table/TableRowSubtasks.tsx
index 4199f010..318ec3eb 100644
--- a/apps/web/src/features/work-items/components/table/TableRowSubtasks.tsx
+++ b/apps/web/src/features/work-items/components/table/TableRowSubtasks.tsx
@@ -32,6 +32,7 @@ export function TableRowSubtasks({
className="-mx-1.5 flex min-w-0 items-center gap-2 rounded px-1.5 py-1 text-left text-xs text-muted-foreground hover:bg-accent/50 hover:text-foreground"
onClick={(e) => {
e.stopPropagation();
+ e.preventDefault();
onOpenIssue(subtask.id);
}}
>
diff --git a/apps/web/src/features/work-items/components/timeline/TimelineBar.tsx b/apps/web/src/features/work-items/components/timeline/TimelineBar.tsx
index 9ba33ec5..e5f1de22 100644
--- a/apps/web/src/features/work-items/components/timeline/TimelineBar.tsx
+++ b/apps/web/src/features/work-items/components/timeline/TimelineBar.tsx
@@ -42,14 +42,12 @@ export function TimelineBar({
const bar = (
<div
onPointerDown={readOnly ? undefined : (e) => onBeginDrag(e, issue, 'move')}
- onClick={
- readOnly
- ? (e) => {
- e.preventDefault();
- onOpen(issue.id);
- }
- : undefined
- }
+ // A drag ends in a click too, so both modes mark it handled and the detail
+ // panel keeps it rather than reading it as a click outside.
+ onClick={(e) => {
+ e.preventDefault();
+ if (readOnly) onOpen(issue.id);
+ }}
className={cn(
'group absolute top-1/2 z-10 flex h-6 -translate-y-1/2 items-center rounded px-1.5 text-white select-none',
cursor,