editor/reftests/caret_on_presshell_reinit-ref.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-ref.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,19 @@
     1.4 +<!DOCTYPE html>
     1.5 +<html>
     1.6 +  <body>
     1.7 +    <div style="position: absolute">
     1.8 +      <iframe src="data:text/html,<body contenteditable>foo</body>"></iframe>
     1.9 +    </div>
    1.10 +    <script type="text/javascript">
    1.11 +      onload = function() {
    1.12 +        var iframe = document.querySelector("iframe");
    1.13 +        var win = iframe.contentWindow;
    1.14 +        var body = win.document.body;
    1.15 +        iframe.focus();
    1.16 +        body.focus();
    1.17 +        var sel = win.getSelection();
    1.18 +        sel.collapse(body.firstChild, 0);
    1.19 +      };
    1.20 +    </script>
    1.21 +  </body>
    1.22 +</html>

mercurial