The problem is pretty straightforward - when you have a select formatted with any of the heading options (H1
,H2
or H3
) it’s width breaks when you try to change the value.
This happens because width is being controlled by the drop down menu, which isn’t formatted and therefore it’s narrower than the currently select text, causing wrapping.