Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
Task details not showing in UI
Browse files Browse the repository at this point in the history
Event.path is deprecated in chrome as of the last update https://chromestatus.com/feature/5726124632965120. This is causing a bug when clicking on a task in the UI. This is also see in safari: #3330. Updating to use composedPath() instead per guidance.

This is compatible with all browsers:
https://developer.mozilla.org/en-US/docs/Web/API/Event/composedPath
  • Loading branch information
ceisen1 authored and peterlau committed Jan 26, 2023
1 parent 58707e2 commit eba3fc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/src/components/diagram/WorkflowGraph.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ class WorkflowGraph extends React.Component {
};

handleClick = (e) => {
const taskRef = e.path[1].id || e.path[2].id; // could be 2 layers down
const taskRef = e.composedPath()[1].id || e.composedPath()[2].id; // could be 2 layers down
const node = this.graph.node(taskRef);
if (node.type === "DF_TASK_PLACEHOLDER") {
if (this.props.onClick) this.props.onClick({ ref: node.firstDfRef });
Expand Down

0 comments on commit eba3fc3

Please sign in to comment.