projectstorm / react-diagrams

a super simple, no-nonsense diagramming library written in react that just works
https://projectstorm.cloud/react-diagrams
MIT License
8.45k stars 1.16k forks source link

[Bug] MOUSE_UP action was ignored if any other mouse button was pressed #940

Open ToTheHit opened 2 years ago

ToTheHit commented 2 years ago

Steps to reproduce:

  1. Press on port by left mouse button. Message "MOUSE DOWN" is sent to console
  2. Press any other mouse button (right, middle, etc.). Message "MOUSE DOWN" is sent to console again.
  3. Release "other" mouse button -> message "MOUSE UP" in console.
  4. Release left mouse button -> nothing

Result: we have 2 messages "MOUSE DOWN" and 1 message "MOUSE UP"

Code example: https://codesandbox.io/s/bug-react-diagrams-m2b611?file=/src/DragLinkState.js