summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/editing/deleting/merge-no-br.html
blob: 5c031590e731b139ef9cbe9558a95e64cfd6ce57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<script>
if (window.testRunner)
     testRunner.dumpEditingCallbacks();
</script>
<style>
div {
    margin: 0.5em;
    padding: 0.5em;
}
</style>
<p>This places the caret before the 'T' in 'Two' and Deletes. 'One' and 'Two' should be merged but the blocks containing 'Three' and 'Four' should remain untouched.</p>
<div contenteditable="true">
<div style="border: 3px solid red;">One</div>
<div id="test"style="border: 3px solid green;">Two<div style="border: 3px solid black;">Three</div>Four</div>
</div>

<script>
var s = window.getSelection();
var e = document.getElementById("test");
s.collapse(e, 0);
document.execCommand("Delete");
</script>