<!DOCTYPE html> | |
<title>Tests that we paint a selection when a newline is selected.</title> | |
<div contentEditable style="width: 100px; height: 100px; border: 5px solid salmon; -webkit-line-break: normal"> | |
fooooooooo baaaaaaaar | |
</div> | |
<script> | |
var text = document.querySelector('div').firstChild | |
window.getSelection().setBaseAndExtent(text, 11, text, 12); | |
</script> |