editor/reftests/caret_on_presshell_reinit-2.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/editor/reftests/caret_on_presshell_reinit-2.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,27 @@
     1.4 +<!DOCTYPE html>
     1.5 +<html class="reftest-wait">
     1.6 +  <body>
     1.7 +    <iframe src="data:text/html,<body><div></div></body>"></iframe>
     1.8 +    <script type="text/javascript">
     1.9 +      onload = function() {
    1.10 +        var i = document.querySelector("iframe");
    1.11 +        var win = i.contentWindow;
    1.12 +        var doc = win.document;
    1.13 +        var div = doc.querySelector("div");
    1.14 +        win.getSelection().collapse(div, 0);
    1.15 +        i.focus();
    1.16 +        div.contentEditable = true;
    1.17 +        div.focus();
    1.18 +        setTimeout(function() {
    1.19 +          var span = doc.createElement("span");
    1.20 +          span.appendChild(doc.createTextNode("foo"));
    1.21 +          div.appendChild(span);
    1.22 +          div.style.outlineWidth = 0; // remove the focus outline
    1.23 +          i.style.position = "absolute";
    1.24 +          document.body.clientWidth;
    1.25 +          document.documentElement.removeAttribute("class");
    1.26 +        }, 0);
    1.27 +      };
    1.28 +    </script>
    1.29 +  </body>
    1.30 +</html>

mercurial