[Bug 17541] Carefully think through how Range.insertNode should behave when the node to be inserted is already at the beginning of the range

https://www.w3.org/Bugs/Public/show_bug.cgi?id=17541

Aryeh Gregor <ayg@aryeh.name> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #6 from Aryeh Gregor <ayg@aryeh.name> ---
This has an undesired side effect I spotted while updating the tests -- if the
eventual insertion will fail, we still removed the node from its parent.  E.g.,
if you have a range in the middle of a text node and try
range.insertNode(document.doctype), we will now remove the doctype from its
current position and then fail to insert it.  Maybe we should test that the
node can actually be inserted at the current position before doing any DOM
mutations?  We've avoided doing that to date, so e.g. we will split a text node
even if the eventual insert will fail.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Wednesday, 23 April 2014 14:52:12 UTC