RESOLVED FIXED307125
text-indent not working on contenteditable elements in Safari 26.2
https://bugs.webkit.org/show_bug.cgi?id=307125
Summary text-indent not working on contenteditable elements in Safari 26.2
jungeun
Reported 2026-02-05 18:20:08 PST
Created attachment 478263 [details] Minimal reproduction page - contenteditable with text-indent SUMMARY text-indent CSS property does not render correctly on elements with contenteditable="true" in Safari 26.2 on both iOS 26.2 and macOS Tahoe 26.2. STEPS TO REPRODUCE 1. Create a <div> with contenteditable="true" and text-indent: 2em. 2. Add enough text to wrap to multiple lines. 3. Open in Safari 26.2. EXPECTED RESULTS The first line should be indented by 2em, same as non-editable elements. ACTUAL RESULTS text-indent is ignored when the element has contenteditable="true". The same style works correctly on non-editable elements. ENVIRONMENT - Safari 26.2 - iOS 26.2 / macOS Tahoe 26.2 - Chrome and Firefox do not have this issue.
Attachments
Minimal reproduction page - contenteditable with text-indent (1.96 KB, text/html)
2026-02-05 18:20 PST, jungeun
no flags
Patch (3.49 KB, patch)
2026-02-15 19:50 PST, alan
no flags
[fast-cq]Patch (3.37 KB, patch)
2026-02-16 06:31 PST, alan
no flags
jungeun
Comment 1 2026-02-05 18:25:56 PST
Clarification on the actual behavior: The issue is not simply that text-indent is ignored. When typing in a contenteditable element with text-indent applied, the indent toggles on and off with each keystroke after text wraps to the second line. This causes visible layout jittering/shifting as the user types. Updated steps to reproduce: 1. Create a <div> with contenteditable="true" and text-indent: 2em. 2. Start typing text. 3. Continue typing until text wraps to the second line. 4. Keep typing on the second line. 5. Observe the first line indent flickering between applied and not-applied on each keystroke.
Ahmad Saleem
Comment 2 2026-02-05 18:49:27 PST
I can reproduce on Safari Technology Preview 236. While typing in middle container, we lose first line indent.
Ahmad Saleem
Comment 3 2026-02-05 18:51:35 PST
It does not reproduce on Chrome Canary 146.0.7669.1 (Official Build) canary-dcheck (arm64)
Ahmad Saleem
Comment 4 2026-02-05 19:33:52 PST
I tested on Safari 18.6 - it reproduces on it as well, so it is not recent regression.
Jonas Walldén
Comment 5 2026-02-09 01:59:06 PST
I've observed the same bug in <textarea> editing as well.
Radar WebKit Bug Importer
Comment 6 2026-02-12 18:21:11 PST
alan
Comment 7 2026-02-15 19:50:49 PST
alan
Comment 8 2026-02-16 06:31:33 PST
Created attachment 478371 [details] [fast-cq]Patch
EWS
Comment 9 2026-02-16 07:59:37 PST
Committed 307646@main (7594f8949c63): <https://commits.webkit.org/307646@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 478371 [details].
Note You need to log in before you can comment on or make changes to this bug.