Invalid browser selection after splitting a text node
https://bugs.webkit.org/show_bug.cgi?id=230594
Summary Invalid browser selection after splitting a text node
James Toohey
Reported 2021-09-21 21:14:28 PDT
Created attachment 438917 [details] Replication HTML file Hi team, As per the spec, when splitting a text node, any live ranges that start or end in the node being split must have their respective nodes and offsets modified. https://dom.spec.whatwg.org/#concept-text-split (Important: Section 7) In Safari 14 (and also in the newly released Safari 15 & Tech Preview), splitting a text node does not correctly adjust the selection to account for this: - The offsets are not adjusted - The nodes are not changed when appropriate Please see the attached HTML file for a replication case. This works correctly in Firefox 92 and Chrome 93.
Attachments
Replication HTML file (785 bytes, text/html)
2021-09-21 21:14 PDT, James Toohey
no flags
Sam Sneddon [:gsnedders]
Comment 1 2021-09-28 09:43:05 PDT
I kinda suspect this might be fixed by bug 220514 (live ranges in selection)? Though at least currently it appears regressed by live ranges in selection (even the initial selection is wrong). Marking this is blocking, then others can debate whether that's fair. ;P
Radar WebKit Bug Importer
Comment 2 2021-09-28 21:15:14 PDT
Ryosuke Niwa
Comment 3 2022-12-17 02:11:30 PST
Enabling live range selection doesn't fix this bug.
Note You need to log in before you can comment on or make changes to this bug.