Scroll – Should a pop-up window be closed if the user scrolls down the area behind?

If I have a container (blue), which can be scrolled and placed as a sidebar. In this container are input fields, checkboxes and especially a small color selector. (yellow – the activator and green – the popup). Now click on the user's color selector button (yellow) and a window appears where the user can choose a color (green).

If this popup (green) close if the user scrolls the area behind it (blue)? Is this already a kind of lost focus?

Drawing

And if the application is resized / moved as your file explorer? Is it also considered a loss of concentration?