22 lines
695 B
HTML
22 lines
695 B
HTML
<!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>吾輩は猫である。<br>名前はまだ無い。</p>
|
|
</div>
|
|
<pre id="log"></pre>
|
|
<script>
|
|
|
|
var test = document.getElementById('test');
|
|
window.getSelection().setPosition(test.getElementsByTagName('p')[0].lastChild, 5);
|
|
window.getSelection().modify('Extend', 'Backward', 'Line');
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|