In Openlayers 6, when the popup appears, the map pan to make the popup fully visible. You can try in this Openlayers example to click near the top border of the map. https://openlayers.org/en/latest/examples/popup.html
But when modifying the popup content with javascript, its size changes according to its content, but the map does not pan and part of the popup is not visible.
How can I make the map pan so that the whole popup is visible.
Thank you