Backed out changeset b71c8c052463 (bug 1943846) for causing mass failures. CLOSED...
[gecko.git] / editor / libeditor / crashtests / 1645983-1.html
blobc1bb7219a5f68e05ee053ee76e2fbffeb1b2369c
1 <div contenteditable>&nbsp;a</div>
2 <script>
3 // For emulating the traditional behavior, collapse Selection to end of the
4 // text node in this <script>.
5 const script = document.querySelector("script");
6 getSelection().collapse(script.lastChild, script.lastChild.length);
7 const editingHost = document.querySelector("div[contenteditable]");
8 editingHost.insertBefore(document.createTextNode(""), editingHost.firstChild);
9 getSelection().collapse(editingHost.firstChild.nextSibling, 2);
10 document.execCommand("delete");
11 </script></body>