Text sequence longer than 10240 are not rendered when text-overflow:ellipsis applied
https://bugs.webkit.org/show_bug.cgi?id=267226
Summary Text sequence longer than 10240 are not rendered when text-overflow:ellipsis ...
Oleksii
Reported 2024-01-08 06:59:27 PST
Created attachment 469338 [details] Image showing the bug: first line of text has 10241 symbol and only ellipsis is rendered. Second line has one symbol fewer and rendered properly My first bug filing here, please let me know if any additional details are needed. I spotted this bug while working on a commercial project but was able to reproduce in isolation, on personal mac and iphone. The limit of text is very deterministic: the bug simply appears when you add just one more symbol to 10240 symbols sequence. When a text with text-overflow: ellipsis; has more than 10240 symbols of any text, the text disappears, only ellipsis is visible. Does not happen in Chrome, have not yet been tested by me in Firefox. Link to sandbox: https://codepen.io/alexeyraspopov/pen/qBvbQqy Link to tweet that includes screenshot: https://twitter.com/alexeyraspopov/status/1743093372833690083 (also attached to the ticket) Steps to reproduce: html: <div id="output_1"></div> <div id="output_2"></div> css: div { overflow: hidden; max-width: 300px; white-space: nowrap; text-overflow:ellipsis; } js: (used purely for rendering a lot of text so I don’t need to paste it) window.output_1.innerText = '0'.repeat(10241); window.output_2.innerText = '0'.repeat(10240);
Attachments
Image showing the bug: first line of text has 10241 symbol and only ellipsis is rendered. Second line has one symbol fewer and rendered properly (4.04 KB, image/png)
2024-01-08 06:59 PST, Oleksii
no flags
Radar WebKit Bug Importer
Comment 1 2024-01-08 07:04:16 PST
zalan
Comment 2 2024-01-08 07:09:44 PST
Thank you for filing this bug report! Sadly, text-overflow: ellipsis (when kerning/ligatures are on) makes us fallback to complex text codepath which seems to be unable to handle content longer than 10K.
Note You need to log in before you can comment on or make changes to this bug.