Description
Feature Description
Currently, when the input element that triggered the opening of the dropdown panel is no longer visible in the viewport (after a scroll up or down), the panel remains still visible, which is weird, as it appears "floating around in the air" and no longer "attached" to its peer input.
After scrolling up (the triggering 'Assignee' input is now off the viewport, higher up)
Using the Intersection Observer API, we could determine is the input is still visible inside the Viewport, and close the panel if it is not.
Additionally, when the input becomes visible again, if the input element still has focus, we could open the panel again.
Use Case
When using the Matautocomplete panel inside a scrollable container and that the input can become visible/hidden after scrolling the viewport