<style> | |
span { display: none } | |
</style> | |
<script> | |
if (window.testRunner) | |
testRunner.dumpAsText(); | |
</script> | |
<body contenteditable> | |
<p>Editing code creates temporary SPANs in some situations. Check we don't crash if we have style span { display: none } | |
<p> | |
<b id=b>select me fully </b><i id=i>select me partially ----------</i> | |
<script> | |
var selection = window.getSelection(); | |
var b = document.getElementById('b'); | |
var i = document.getElementById('i'); | |
selection.setBaseAndExtent(b, 0, i.firstChild, 20); | |
document.execCommand("Delete"); | |
</script> | |
</body> |