Re: [w3c/editing] `insertText` should move to parent node if range's start container is a void element (Issue #522)

masayuki-nakano left a comment (w3c/editing#522)

FYI: [Firefox stared doing that](https://searchfox.org/firefox-main/rev/131497bb1b747587b2b21b1abf14f44ecffad805/editor/libeditor/HTMLEditUtils.h#548-560) and I had added some tests about that:
* [/editing/other/editing-around-select-element.tentative.html](https://searchfox.org/firefox-main/source/testing/web-platform/tests/editing/other/editing-around-select-element.tentative.html)
* [/editing/other/insert-paragraph-in-void-element.tentative.html](https://searchfox.org/firefox-main/source/testing/web-platform/tests/editing/other/insert-paragraph-in-void-element.tentative.html)
* [/editing/other/insert-text-in-void-element.tentative.html](https://searchfox.org/firefox-main/source/testing/web-platform/tests/editing/other/insert-text-in-void-element.tentative.html)

Note that the similar thing for deleting selected range which starts/ends in a void or a replaced element is more complicated.
https://searchfox.org/firefox-main/rev/131497bb1b747587b2b21b1abf14f44ecffad805/editor/libeditor/AutoClonedRangeArray.cpp#167-168,184-186,199-200,221-222

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/editing/issues/522#issuecomment-3782227437
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/editing/issues/522/3782227437@github.com>

Received on Thursday, 22 January 2026 02:51:50 UTC