This is due to the fact, that we used display: none while the initial version of the diagram was loaded. By changing that to visibility: hidden, browsers can correctly compute the bbox of text elements.