Backed out changeset b71c8c052463 (bug 1943846) for causing mass failures. CLOSED...
[gecko.git] / editor / libeditor / crashtests / 1655508.html
blobe30aba0ca0254fe2c7a7af698598935fea2b67e8
1 <html>
2 <head>
3 <script>
4 document.addEventListener("DOMContentLoaded", () => {
5 // For emulating the traditional behavior, collapse Selection to end of the
6 // text node at end of the <body> (end of the text node after the <h3>).
7 getSelection().collapse(
8 document.body.lastChild,
9 document.body.lastChild.length
11 const textarea = document.querySelector("textarea");
12 const abbr = document.querySelector("abbr");
13 let node;
14 document.addEventListener("DOMAttrModified", event => {
15 node = event.originalTarget.getRootNode({});
16 abbr.insertBefore(textarea, abbr.childNodes[0]);
17 }, false);
18 abbr.contentEditable = false;
19 node.normalize();
20 document.designMode = "on";
21 document.execCommand("insertParagraph");
22 });
23 </script>
24 </head>
25 <body>
26 <dfn contenteditable>
27 <abbr></abbr>
28 </dfn>
29 <h3>
30 <textarea autofocus></textarea>
31 <script></script>
32 </h3>
33 </body>
34 </html>