blob: 3c8548956cd7dc842556a08affda392869e164c3 [file] [log] [blame]
<p>This tests for a bug where expansion for smart delete would not consider editable boundaries. Only 'foo' should be deleted. You should see ' bar'. <b>There is a bug: while the non-editable space isn't deleted, deletion inserts a placeholder when it shouldn't.</b></p>
<div contenteditable="true" id="div">foo<span contenteditable="false"> bar</span></div>
<script>
var div = document.getElementById("div");
var sel = window.getSelection();
sel.setPosition(div, 0);
sel.modify("extend", "forward", "word");
document.execCommand("Delete");
</script>