4 <script src=
"../../resources/dump-as-markup.js"></script>
8 testRunner
.dumpEditingCallbacks();
11 var editable
= document
.createElement('div');
12 editable
.contentEditable
= true;
13 editable
.innerHTML
= '<a href="#" id="anchor">1</a><div>3</div>';
14 document
.body
.appendChild(editable
);
17 // Edit it with execCommand
18 var sel
= window
.getSelection();
19 sel
.collapse(document
.getElementById('anchor'), 1);
20 document
.execCommand("InsertParagraph");
21 document
.execCommand("InsertText", false, "2");
23 Markup
.description('This tests the fix for <rdar://problem/6633727> - Hitting return at the end of a line with an anchor jumps me to the bottom of the message.\n'+
24 'If the test has passed, the numbers should be in order, and only "1" should be a link.');
25 Markup
.dump(editable
);