Skip to content

Commit

Permalink
delay context menu for activities to allow selection event to occur f…
Browse files Browse the repository at this point in the history
…irst
  • Loading branch information
duranb committed Nov 9, 2023
1 parent ddbc3bb commit 97d2fa7
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/components/timeline/LayerActivity.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -331,12 +331,15 @@
}
const showContextMenu = !!e && isRightClick(e);
if (showContextMenu) {
dispatch('contextMenu', {
e,
layerId: id,
selectedActivityDirectiveId,
selectedSpanId,
});
// delay the context menu a little bit to allow any selection events to occur first
setTimeout(() => {
dispatch('contextMenu', {
e,
layerId: id,
selectedActivityDirectiveId,
selectedSpanId,
});
}, 1);
}
}
Expand Down

0 comments on commit 97d2fa7

Please sign in to comment.