blob: 95476ccf41cd1d7dea1532518cd32476fb0ee9d3 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<style> .selected { color: blue; } </style>
</head>
<body>
<p>This tests horizontal caret movement in vertical writing mode.</p>
<div id="test" style="font-family: monospace; font-size: 20px; height: 15ex; -webkit-writing-mode: vertical-rl; -webkit-text-orientation: sideways; outline: none;" contenteditable>
<p dir="rtl">אני חתול.<br>אין לי שם.</p>
</div>
<pre id="log"></pre>
<script>
var test = document.getElementById('test');
window.getSelection().setPosition(test.getElementsByTagName('p')[0].firstChild, 5);
window.getSelection().modify('Extend', 'Forward', 'Line');
</script>
</body>
</html>