Hi,
I had exactly the same issue. Turns out it was getting upset by my use of double br tags: <br><br>
(this was within a table data element, I'm not sure if that is relevant to the cause of the issue).
I was doing this to get a blank line between my sentences. I guess the <p> tag is for this purpose, but regardless, I had done this and it cause this issue to surface.
The ESRI map popup was interpreting the double <br><br> correctly in the lower section of the popup text but also pre-pending: <br class="esri-text-new-line"> before the entire table structure, causing the large panel of white space above my table. It prepended this element once for every instance of <br><br> within the html.
Changing from <br><br> to a single <br> tag stopped the pre-pending of <br class="esri-text-new-line"> but now had no extra line between the sentences.
Changing from <br><br> to sentences wrapped in <p></p> also prevented the issue, while also maintaining the extra line gap between the sentences.
Hope that helps the next person reading this.