2 <title>Test for Bug
1355792</title>
3 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
4 <link rel=
"stylesheet" href=
"/tests/SimpleTest/test.css">
5 <div contenteditable
><div><font><table><td>a
</table><br><br><table><td>b
</table></font></div></div>
7 var font
= document
.querySelector("font");
8 getSelection().collapse(font
, 1);
9 document
.execCommand("forwarddelete");
10 is(document
.body
.firstChild
.innerHTML
,
11 "<div><font><table><tbody><tr><td>a</td></tr></tbody></table><br>"
12 + "<table><tbody><tr><td>b</td></tr></tbody></table></font></div>",
13 "No creating an extra <br>");
14 is(getSelection().focusNode
, font
, "Selection node should not change");
15 is(getSelection().focusOffset
, 1, "Selection offset should not move");
16 ok(getSelection().isCollapsed
, "Selection should be collapsed");