Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor throws error when enabling dragging while a tool is active #881

Closed
sentry-io bot opened this issue Apr 12, 2024 · 1 comment · Fixed by #882
Closed

Editor throws error when enabling dragging while a tool is active #881

sentry-io bot opened this issue Apr 12, 2024 · 1 comment · Fixed by #882
Assignees
Labels
bug Something isn't working

Comments

@sentry-io
Copy link

sentry-io bot commented Apr 12, 2024

See comment, wrong issue linked initially

Steps to Reproduce:

  • press and hold c in the editor
  • the connect tool should now be enabled/disabled rapidly
  • click on an element
  • The error is shown in the console

Root Cause:
This behavior causes a mismatch between Dragging state Active state in the tool manager. When we try to start a connection through clicking, dragging is initiated. Because we cancel the event (

dragging.cancel();
return;
) while we are initiating the drag operation, it breaks when we access the context immediately after.

Proposed Fix:
It is not clear why we cancel dragging in this place. This should be handled either by dragging or a higher component, such as global-connect. This is already the case.
No tests break in diagram-js and bpmn-js by just removing this logic, and with my tests, everything still works as expected.

@sentry-io sentry-io bot added the bug Something isn't working label Apr 12, 2024
@marstamm marstamm added the in progress Currently worked on label Apr 12, 2024
marstamm added a commit that referenced this issue Apr 12, 2024
marstamm added a commit that referenced this issue Apr 12, 2024
@bpmn-io-tasks bpmn-io-tasks bot added needs review Review pending and removed in progress Currently worked on labels Apr 12, 2024
Copy link
Author

sentry-io bot commented Apr 12, 2024

Sentry Issue: BPMN-IO-DEMO-1GX

marstamm added a commit that referenced this issue Apr 12, 2024
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant