editor/libeditor/crashtests/1645983-1.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

<div contenteditable>&nbsp;a</div>
<script>
// For emulating the traditional behavior, collapse Selection to end of the
// <body>, i.e., at the text node after this <script>.
getSelection().collapse(document.body, document.body.childNodes.length);
const editingHost = document.querySelector("div[contenteditable]");
editingHost.insertBefore(document.createTextNode(""), editingHost.firstChild);
getSelection().collapse(editingHost.firstChild.nextSibling, 2);
document.execCommand("delete");
</script>