Skip to content

Commit 4779d56

Browse files
committed
fix(webapp): restore alt-click bulk expand/collapse on leaf tree rows
The task-arrow button used a disabled attribute for leaf rows, which also blocks the click event entirely, so alt-clicking a leaf's arrow no longer expanded or collapsed every row at that depth. Guard the per-node toggle instead and keep the button clickable, and mark it aria-disabled for styling. Also pass preventScroll to the post-toggle focus() call so it can't fight the just-completed scrollToNode.
1 parent 78c66f4 commit 4779d56

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam/route.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,7 @@ function TasksTreeView({
10751075
<button
10761076
type="button"
10771077
tabIndex={-1}
1078-
disabled={!node.hasChildren}
1078+
aria-disabled={!node.hasChildren}
10791079
aria-label={state.expanded ? "Collapse task" : "Expand task"}
10801080
className={cn(
10811081
"flex h-8 w-4 items-center focus-custom",
@@ -1089,11 +1089,11 @@ function TasksTreeView({
10891089
} else {
10901090
expandAllBelowDepth(node.level);
10911091
}
1092-
} else {
1092+
} else if (node.hasChildren) {
10931093
toggleExpandNode(node.id);
10941094
}
10951095
scrollToNode(node.id);
1096-
parentRef.current?.focus();
1096+
parentRef.current?.focus({ preventScroll: true });
10971097
}}
10981098
>
10991099
{node.hasChildren ? (

0 commit comments

Comments
 (0)