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

gmta created an issue (w3c/editing#522)

When inserting text, we should not use void elements (such as `<br>`) as the target for insertion but rather move up the tree to its parent. I suspect we need to add a step between step 6 and 7 [of the inserttext command](https://w3c.github.io/editing/docs/execCommand/#the-inserttext-command) stating that if node is a [void element](https://html.spec.whatwg.org/multipage/syntax.html#void-elements), set offset to node's index and node to node's parent.

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

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

Received on Monday, 12 January 2026 13:52:44 UTC