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

[#3442] fix: can't click task card to open the right panel while using FireFox #3444

Closed
wants to merge 1 commit into from

Conversation

nhandt2021
Copy link
Contributor

@nhandt2021 nhandt2021 commented Jan 13, 2023

Pull Request type

  • Bugfix

Changes in this PR

Issue #3442

User can't click on task at flow diagram to open the right side panel while using FireFox browser.

Screen.Recording.2023-01-13.at.15.41.41.mov

*/
getTaskRef = (e) => {
const isFirefox = navigator.userAgent.toLowerCase().indexOf("firefox") > -1;
if (isFirefox) {
Copy link

@arketec arketec Jan 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix should also work in the latest version of Chrome:

from the latest console in chrome:
image

This was tested at the breakpoint at line 342 in the current src (355 in this commit)

referring to the workflow from my original question:
#3442

handleClick = (e) => {
const taskRef = e.path[1].id || e.path[2].id; // could be 2 layers down
const taskRef = this.getTaskRef(e);
Copy link
Contributor

@ceisen1 ceisen1 Jan 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this could be made simpler with event.composedPath(). Chrome recommends updating to this for the now deprecated event.path API https://chromestatus.com/feature/5726124632965120.

It also seems to be compatible with all major browsers https://developer.mozilla.org/en-US/docs/Web/API/Event/composedPath#browser_compatibility

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added the fix here #3459

@nhandt2021 nhandt2021 closed this Feb 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants