Chrome Version: 59 canary
OS: All but iOS
What steps will reproduce the problem?
(1) Open the following HTML.
<!DOCTYPE html>
<div>bar</div>
<script>
var r = document.createRange();
var d = document.querySelector('div');
var t = d.firstChild;
r.setStart(t, 1);
r.setEnd(t, 2);
r.surroundContents(d);
</script>
What is the expected result?
HierarchyRequestError is thrown at the step 5 of https://dom.spec.whatwg.org/#dom-range-surroundcontents . So, the content of <div> is empty,
What happens instead?
HierarchyRequestError is thrown before the step 3. So the document is unchanged.
Please use labels and text to provide additional information.
Firefox: OK
Safari: OK
Edge: NG, same as Chrome.
For graphics-related bugs, please copy/paste the contents of the about:gpu
page at the end of this report.
Comment 1 by phistuck@chromium.org
, Mar 9 2017