Bug 47916

Summary: selectAllChildren & extractContents do not extract all contents
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: DOMAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: ap, darin, enrica, jparent, tony
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   

Ryosuke Niwa
Reported 2010-10-19 11:36:36 PDT
window.getSelection().selectAllChildren(test); window.getSelection().getRangeAt(0).extractContents(); does not extract all the contents in test because we canonicalize the selection. For example, if div was: <div id="test"><a href="http://webkit.org/">hello</a></div> The above script results in <div id="test"><a href="http://webkit.org/"></a></div> because the endContainer of getRangeAt(0) is "hello" (TextNode).
Attachments
Note You need to log in before you can comment on or make changes to this bug.