bpmn-io / diagram-js

A toolbox for displaying and modifying diagrams on the web.
MIT License
1.7k stars 419 forks source link

Dragging around diagrams via the middle mouse button causes the cursor to get stuck on autoscrolling #677

Open Skaiir opened 2 years ago

Skaiir commented 2 years ago

Describe the Bug

Dragging the diagram view around with middle mouse click leads the cursor to be stuck as an autoscrolling cursor, visual example:

Camunda_Modeler_im50S76Zgs

Steps to Reproduce

  1. Create a new diagram, either via form-js or dmn-js
  2. Drag the diagram around with middle-click, then release middle-click
  3. The cursor is now stuck on the autoscroll icon
  4. Use the application normally and the auto-scroll cursor stays around until
  5. Middle-click twice to reset back to a normal cursor

Expected Behavior

The auto-scroll cursor should never really show up, as it's not a form of navigation we use in diagram-js (@nikku correct if I am wrong). Instead we'd expect the hand cursor only, and to revert back to a normal cursor when middle-mouse is released.

Environment

Browser: Chromium (Electron) OS: Windows 10 64bit Could repeat in Camunda Modeler 5.1 & 5.4rc1

Skaiir commented 2 years ago

Something to note about this issue:

griimick commented 2 years ago

I have been exploring related areas for some time. I saw the same issue as I normally use middle-mouse drag for movement in canvas.

Reproducible in Windows 11 22H1 64bit as well on both Camunda Modeler v5.1 and v5.4 with the steps mentioned above. I think the auto-scroll mode gets triggered by the default event handler if there is an underlying overflowing scrollable element on the middle mouse click.

Sharing my observations,

  1. v5.1.0 - reproducible in all editor types in 5.1
  2. v5.4.0 - reproducible in cloud-bpmn v8 editor only
  3. macOS does not really have the middle mouse auto-scroll functionality, so couldn't get the auto-scroll pointer to show up.

Tried the following,

Browser: Chromium (Electron) OS: Windows 10 64bit Camunda Modeler 5.1 & 5.4.0