summaryrefslogtreecommitdiffstats
path: root/layout/base/tests/bug1109968-1-ref.html
blob: 28bcf608a7364684f76c51df6df756c4a7e9efc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<html class="reftest-wait">
  <body onload="start()">
    <div onfocus="done()" contenteditable>foo<div contenteditable="false"><a href="#">bar</a></div>baz</div>
    <script>
      var div = document.querySelector("div");
      function start() {
        div.focus();
      }
      function done() {
        var sel = getSelection();
        // Set the caret right before "baz"
        sel.collapse(div.lastChild, 0);
        document.documentElement.removeAttribute("class");
      }
    </script>
  </body>
</html>