Bug 47916
Summary: | selectAllChildren & extractContents do not extract all contents | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> |
Component: | DOM | Assignee: | 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
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |