4 <meta http-equiv=
"Content-Type" content=
"text/html; charset=utf-8">
5 <link rel=
"stylesheet" type=
"text/css" href=
"resources/extend-selection.css" />
6 <script src=
"resources/move-by-word-visually.js"></script>
10 var sel
= window
.getSelection();
11 sel
.collapse(document
.getElementById('d_1'), 0);
12 sel
.modify("move", "right", "word");
13 if (sel
.anchorOffset
== 5)
16 log("ctrl/alt+right from left of סטז should move cursor to left of opq. " +
17 "But it actually moved to position " + sel
.anchorOffset
);
23 if (window
.testRunner
&& window
.internals
) {
24 testRunner
.dumpAsText();
25 internals
.settings
.setEditingBehavior('win');
28 <title>wrong result because VisiblePosition.left()/right() returns wrong result
</title>
31 <div id=
"testMoveByWord">
32 <div dir=ltr contenteditable
>abc ששש def
<span id=
"d_1" dir=rtl
>שנב opq סטז
</span> uvw ששש xyz
</div>
34 <ul id=
"console"></ul>