editor/libeditor/crashtests/1405897.html
author Butkovits Atila <abutkovits@mozilla.com>
Sun, 25 Sep 2022 02:06:13 +0300
changeset 636394 94436fdd766dbf69bdec71e091ad913d003c971d
parent 636050 9b15baab6f77d09eca2956276f66fee97555e4a1
permissions -rw-r--r--
Backed out changeset f6031e0a3a0b (bug 1790790) for causing telemetry failures. CLOSED TREE

<style>
* { position: absolute; }
</style>
<script>
function onLoad() {
  // For emulating the traditional behavior, collapse Selection to end of the
  // <iframe> which is the last child of the <body>.  Note that <iframe> is
  // treated as a container in HTMLEditor.
  getSelection().collapse(document.body, document.body.childNodes.length);
  document.querySelector("del").addEventListener("DOMSubtreeModified", () => {
    document.execCommand("italic");
    document.execCommand("selectAll");
  });
  document.querySelector("a[contenteditable]").replaceChild(
    document.querySelector("iframe"),
    document.querySelector("a[contenteditable]").childNodes[0]
  );
}
</script>
<body onload="onLoad()">
<a contenteditable>
<del>
<iframe>