1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24

content / test / data / accessibility / event / caret-move.html [blame]

<!--
@WIN-DENY:IA2_EVENT_TEXT_INSERTED*
@WIN-DENY:IA2_EVENT_TEXT_REMOVED*
-->
<!DOCTYPE html>
<html>
<body>
<input id="in1" type="text" value="abcde">
<script>
  function go() {
    const inp = document.getElementById('in1');
    inp.focus();
    inp.setSelectionRange(0, 0);
    setTimeout(() => {
      inp.setSelectionRange(1, 1);
      setTimeout(() => {
        inp.blur();
        inp.value = 'end'; // Trigger test end.
      }, 50);
    }, 50);
}
</script>
</body>
</html>