NEW275185
Selection's .focusOffset can exceed the number of child nodes that .focusNode has
https://bugs.webkit.org/show_bug.cgi?id=275185
Summary Selection's .focusOffset can exceed the number of child nodes that .focusNode...
Han
Reported 2024-06-05 15:42:09 PDT
In both Safari 17 and the latest Safari Tech Preview, the selection's .focusOffset can exceed the number of child nodes that .focusNode has, if the cursor is at the top-level of a contentEditable and a child is removed in a `beforeinput` event handler: https://output.jsbin.com/wupuhef Possibly related? https://bugs.webkit.org/show_bug.cgi?id=251020
Attachments
Ahmad Saleem
Comment 1 2024-06-05 17:10:57 PDT
*** Firefox Nightly 128 *** focusOffset: 7 focusNode children: 7 focusOffset: 6 focusNode children: 6 focusOffset: 7 focusNode text length: 7 focusOffset: 6 focusNode text length: 6 *** Safari Technology Preview 196 *** focusOffset: 7 focusNode children: 7 focusOffset: 7 focusNode children: 6 <---- focusOffset focusOffset: 7 focusNode text length: 7 focusOffset: 6 focusNode text length: 6 *** Chrome Canary 127 *** focusOffset: 1 focusNode children: 0 focusOffset: 6 focusNode children: 6 focusOffset: 7 focusNode text length: 7 focusOffset: 6 focusNode text length: 6
Radar WebKit Bug Importer
Comment 2 2024-06-12 15:43:13 PDT
Note You need to log in before you can comment on or make changes to this bug.