RESOLVED FIXED 248201
Strings are not wrapped at zero width spaces when "word-break: keep-all" is set
https://bugs.webkit.org/show_bug.cgi?id=248201
Summary Strings are not wrapped at zero width spaces when "word-break: keep-all" is set
Mark Donnellon
Reported 2022-11-21 19:10:37 PST
I expect zero width spaces to have the same effect as regular spaces regarding wrapping text. However, in Safari, lines are not broken at zero width spaces. This is different to Chrome and Firefox, which break lines on zero width spaces when wrapping. https://codesandbox.io/s/wrapping-japanese-with-zwsp-f1nuic?file=/index.html
Attachments
[fast-cq]Patch (2.99 KB, patch)
2022-11-21 21:20 PST, zalan
no flags
screen-shot of the test case with the patch applied (870.23 KB, image/png)
2022-11-21 21:22 PST, zalan
no flags
Mark Donnellon
Comment 1 2022-11-21 19:13:44 PST
My use case for this functionality was to allow my japanese strings to indicate appropriate spots to break lines without creating space between characters.
zalan
Comment 2 2022-11-21 20:00:01 PST
Thank you for filing this bug report. It looks like zero-width space is not treated as a soft wrap opportunity when "word-break: keep-all" is set on the block container.
Radar WebKit Bug Importer
Comment 3 2022-11-21 20:00:25 PST
zalan
Comment 4 2022-11-21 21:20:40 PST
Created attachment 463656 [details] [fast-cq]Patch
zalan
Comment 5 2022-11-21 21:22:00 PST
Created attachment 463657 [details] screen-shot of the test case with the patch applied
EWS
Comment 6 2022-11-22 06:58:06 PST
Committed 256937@main (d97fdbd62db3): <https://commits.webkit.org/256937@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 463656 [details].
Mark Donnellon
Comment 7 2022-11-22 14:50:10 PST
Wow! I'm glad I could create a good bug report and it was addressed so quickly!
zalan
Comment 8 2022-11-22 14:56:35 PST
(In reply to Mark Donnellon from comment #7) > Wow! I'm glad I could create a good bug report and it was addressed so > quickly! I wish all bug reports were like this :) Thanks again!
Note You need to log in before you can comment on or make changes to this bug.