Backed out changeset b71c8c052463 (bug 1943846) for causing mass failures. CLOSED...
[gecko.git] / editor / libeditor / crashtests / 766387.html
bloba819bf7f894194dc39c35be711edb47bf13ce662
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script>
5 function onLoad() {
6 const editingHost = document.querySelectorAll("div[contenteditable]");
7 // For emulating the traditional behavior, collapse Selection to end of the
8 // last <div contenteditable> which is the deepest last child of the <body>.
9 getSelection().collapse(editingHost[1], editingHost[1].childNodes.length);
10 getSelection().removeAllRanges();
11 const r = document.createRange();
12 r.setStart(editingHost[0], 1);
13 r.setEnd(editingHost[1], 0);
14 getSelection().addRange(r);
15 document.execCommand("insertOrderedList");
17 </script>
18 </head>
20 <body onload="onLoad();"><div contenteditable>a</div><div contenteditable></div></body>
21 </html>