summaryrefslogtreecommitdiffstats
path: root/layout/base/tests/bug644428-1-ref.html
blob: 9a771db8512efcc7907cb46b6fd521be4cb1fc9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!DOCTYPE html>
<html>
  <head>
    <script 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>