| Summary: | Range.selectNode cannot select a detached node | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ryosuke Niwa <rniwa> |
| Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | cdumez, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
*** This bug has been marked as a duplicate of bug 149490 *** |
var div = document.createElement('div'); div.appendChild(document.createElement('p')); var range = document.createRange(); range.selectNode(div.firstChild); throws a INVALID_NODE_TYPE_ERROR but it shouldn't. The problem is that checkNodeBA throws this exception when the root node of refNode is not a document, a document fragment, or an Attr node. This bug was found by the newly added LayoutTests/http/tests/w3c/dom/ranges/Range-selectNode.html