I use the following line to generate a chat message from javascript:
var d = '<div class="triangle-border2 left">' + message +
'<span style="flex: 1 1 30px"></span><span style="float:right; font-size:80%; color:#5a8f00;margin-top:2px">' +
h + ':' + m + '</span></div>';
message is the message body, h is the hour and m is the minute. The div has a maximum width in its style. Here is the output for some messages:
What is the problem with the 'kkkk' and 'nnnnn' lines that makes the time overflows outside the div? Why doesn't it behave like the 'mmmmmm' line? How can I fix it?
Note: The browser is Chromium, and this is fixed.

<span style="flex: 1 1 30px"></span>?dis appended to a panel. It is not easy to provide a minimal, complete and verifiable example, as the system is rather complex. I tried to simplify to the maximum.