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