Overlay components position overlap, misaligned in questions
Expected behaviour
Overlay components, when using arrow keys to navigate and select items, should be positioned similar to mouse actions.
Current behaviour
When adding an image, the Alt text and Long description overlap, and the user cannot see what they are typing into alt text field.
Furthermore, adding images in question types results in both meta fields being placed incorrectly, often in the middle of the image and off to the left.
Steps to reproduce
- Select any question type
- Insert an image
- Use
upanddownarrow keys to navigate and highlight the image -
Alt textandLong descriptionwill be overlapped, and incorrectly positioned in relation to the image.
Environment
This occurs in all environments.
Possible solution
In the OverlayService, the focusedView is used to determine positioning, but in the AltComponent, the main view is used instead. It would seem that using the main view would be more consistent, but this could be introducing more errors that the solution might not have considered. So conditionally using the main view for image overlays could address this immediate issue.
To separate the default locations, the top offset can be changed for alt text to better match the component's click calculations.