summaryrefslogtreecommitdiffstats
path: root/layout/base/tests/bug644428-1-ref.html
blob: ee193b0bb04d0765eedce1eb58a49439e728283a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!DOCTYPE html>
<html>
  <head>
    <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
  </head>
  <body onload="setupCaret()">
    <div contenteditable>a</div>
    <script>
      function setupCaret() {
        var div = document.querySelector("div");
        div.focus();
        var sel = window.getSelection();
        sel.collapse(div, 1);
      }
    </script>
  </body>
</html>