[Bug] Restore keyboard controls more easily after using segmentation dropdown
Describe the Bug
When loading one or multiple segmentations (basic viewer or segmentation mode) and using the drop-down in the right segmentation sidebar/panel, the keyboard controls are no longer working until one has clicked outside the drop-down or pressed ESC. And importantly, clicking on one of the viewers (which a user will intuitively do) does not restore the keyboard controls, one has to click somewhere on the toolbar or sidebars/panels.
Addressing this would significantly improve the user experience when working with segmentations.
Tested in v3.7.0 and v3.8.0-beta54.
Steps to Reproduce
- Open a dataset
- Load one or multiple segmentations
- Use keyboard controls, e.g. arrow up and down to scroll between images
- Use the segmentation drop-down in the right sidebar/panel to select or switch segmentation
- Try again to use keyboard controls, does not work
- Click on the viewer and try again to use keyboard controls, does not work
- Click on a sidebar/panel or the toolbar, or press Escape, keyboard controls are restored
The current behavior
Keyboard controls no longer work until one clicks outside of the drop-down (but not on a viewer) or one presses "Escape".
The expected behavior
Ideally, upon selecting a segmentation in the drop-down via mouse-click, keyboard controls are directly restored. As a minimum, a click on the viewer should restore keyboard controls.
OS
Alpine
Node version
20.11.1
Browser
Chrome 122.0.6261.69