https://github.com/mozilla/gecko-dev
Raw File
Tip revision: 1167ff8b0255bf1796844750f5053a3e9d509366 authored by seabld on 13 September 2012, 03:40:25 UTC
Added tag SEAMONKEY_2_13b3_RELEASE for changeset FIREFOX_16_0b3_BUILD1. CLOSED TREE a=release
Tip revision: 1167ff8
bug585922-ref.html
<!DOCTYPE html>
<html class="reftest-wait">
  <head>
    <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
  </head>
  <body onload="doTest()">
    <input type=text>
    <script>
      function doTest() {
        netscape.security.PrivilegeManager.enablePrivilege(
          "UniversalXPConnect");

        var d = document.querySelector("input");
        d.value = "b";
        d.focus();
        var editor = d.QueryInterface(Components.interfaces.nsIDOMNSEditableElement).editor;
        var sel = editor.selection;
        var t = editor.rootElement.firstChild;
        sel.collapse(t, 1); // put the caret at the end of the textbox
        document.documentElement.removeAttribute("class");
      }
    </script>
  </body>
</html>
back to top