projectstorm / react-diagrams

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

CTRL + SHIFT + J locks everything #812

Open sinanyaman95 opened 3 years ago

sinanyaman95 commented 3 years ago

Issue Description

On Chrome, when I click CTRL + SHIFT + J to open developer tools, canvas and model gets locked. I think shift key isn't registered as released, so everything happens as if I am holding shift the entire time:

react-diagrams-issue

Can be replicated here: https://projectstorm.cloud/react-diagrams/iframe.html?id=advanced-techniques--drag-and-drop or any other storybook examples, given that you open it in new tab

EDIT: CTRL + SHIFT + T, CTRL + SHIFT + O also does the same effect

zacharyzhy commented 3 years ago

clicking shift again would release the shift lock. I haven't figured out a solution, but this is a temporary one. The root cause is how Chrome detects key holds. The library detects key release to stop the key holds, and when you do combo keys, the browser would not send the key up event to the js, so the library would be stuck at the multi-select mode.