DigitalSlideArchive / wsi-superpixel-guided-labeling

Other
2 stars 5 forks source link

Remove keydown listener if already set #106

Closed bnmajor closed 4 months ago

bnmajor commented 4 months ago

Occasionally the container is mounted twice but not destroyed, and this results in keydown events triggering the listener more than once.

Unfortunately I have been unable to reproduce this consistently in order to fix the real underlying issue. For now we just unregister the keydown listener before registering it. If it has not yet been registered nothing will happen, but if it has we will prevent registering it twice.

Fixes #94