blob: 2a2e0a895c02a47aa85e6bcf4dd6e6c3da46b658 [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. "ある。" and "名前はまだ" must be selected.</p>
<div id="test" style="height: 30ex; -webkit-writing-mode: vertical-rl; outline: none;" contenteditable>
<p>吾輩は猫である。</p>
<p>名前はまだ無い。</p>
</div>
<pre id="log"></pre>
<script>
var test = document.getElementById('test');
window.getSelection().setPosition(test.getElementsByTagName('p')[1].lastChild, 5);
window.getSelection().modify('Extend', 'Backward', 'Line');
</script>
</body>
</html>