Skip to content

Commit 72ca3d3

Browse files
authored
Add transparent rect for pending lines to be clickable for Firefox/Safari (#2813)
1 parent 5025610 commit 72ca3d3

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

src/lib/components/lines-and-dots/svg/timeline-graph-row.svelte

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@
9494
$: activityTaskScheduled = group.eventList.find(isActivityTaskStartedEvent);
9595
$: retried =
9696
activityTaskScheduled && activityTaskScheduled.attributes?.attempt > 1;
97+
$: pendingLine = group.isPending || !!pauseTime;
9798
</script>
9899

99100
<g
@@ -104,6 +105,19 @@
104105
class="relative cursor-pointer"
105106
{height}
106107
>
108+
{#if pendingLine}
109+
{@const width = pauseTime
110+
? points[1] - points[0]
111+
: canvasWidth - 2 * gutter}
112+
<rect
113+
y={y - height / 2}
114+
x={points[0]}
115+
{width}
116+
{height}
117+
fill="transparent"
118+
pointer-events="all"
119+
/>
120+
{/if}
107121
{#each points as x, index}
108122
{@const nextPoint = points[index + 1]}
109123
{@const showText = textIndex === index}

src/lib/layouts/workflow-history-layout.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
{/if}
9191
</div>
9292
</div>
93-
<div class="relative px-2 pb-24 md:px-4 lg:px-8">
93+
<div class="relative select-none px-2 pb-24 md:px-4 lg:px-8">
9494
<div
9595
class="flex flex-wrap items-center justify-between gap-2 bg-off-white/50 py-2 xl:gap-8 dark:bg-space-black/50"
9696
class:sticky-header={!$minimizeEventView}

0 commit comments

Comments
 (0)