summaryrefslogtreecommitdiffstats
path: root/editor/libeditor/crashtests/1645983-2.html
blob: 132c1381f3025ed754baf73cf980ccba1a490840 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<!doctype html>
<div contenteditable>abc<span></span><span></span></div>
<script>
// For emulating the traditional behavior, collapse Selection to end of the
// text node after this <script>.
getSelection().collapse(
  document.body.lastChild,
  document.body.lastChild.length
);
const editingHost = document.querySelector("div[contenteditable]");
getSelection().collapse(editingHost, 3);
document.execCommand("insertText", false, " ");
</script>
</body>