projectstorm / react-diagrams

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

Fire keyup events for ActionEventBus.keys on document blur #920

Open somaraani opened 2 years ago

somaraani commented 2 years ago

Checklist

What?

Fire key-up events for all keys in action event bus on document blur

Why?

919

How?

Iterate through ActionEventBus.keys and fire keyup event on document blur.

Feel good image:

(Add your own one below :])

LOL

dylanvorster commented 2 years ago

might be better to use, as it covers all cases and not just blur. Can you give this a test?

 document.addEventListener('visibilitychange' ...);
    document.addEventListener('focusin', ...);