-
Notifications
You must be signed in to change notification settings - Fork 733
Description
Browsers differ in behavior when faced with the following, if the line-end would normally fall between お and か (i.e. at the boundary of the span
):
<p>あいうえお<span style="white-space:pre">か</span>きくけこ</p>
Live example here: http://jsbin.com/bedumox/edit?html,css,output
Firefox and Edge (and presto) allow the break between お and か. Safari and Chrome don't. Language tagging and the switching the word-break
property between auto
and break-all
does not make any difference.
I suspect the Firefox / Edge behavior is correct, and the the Chrome / Safari behavior is a side effect of a bug of theirs that suppresses break opportunities at element boundaries [1][2], but I did not manage to find a justification either way in the spec for the case I am discussing here.
[1] https://bugs.chromium.org/p/chromium/issues/detail?id=282134
[2] https://bugs.webkit.org/show_bug.cgi?id=158771