editor/reftests/caret_on_presshell_reinit-2.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <!DOCTYPE html>
     2 <html class="reftest-wait">
     3   <body>
     4     <iframe src="data:text/html,<body><div></div></body>"></iframe>
     5     <script type="text/javascript">
     6       onload = function() {
     7         var i = document.querySelector("iframe");
     8         var win = i.contentWindow;
     9         var doc = win.document;
    10         var div = doc.querySelector("div");
    11         win.getSelection().collapse(div, 0);
    12         i.focus();
    13         div.contentEditable = true;
    14         div.focus();
    15         setTimeout(function() {
    16           var span = doc.createElement("span");
    17           span.appendChild(doc.createTextNode("foo"));
    18           div.appendChild(span);
    19           div.style.outlineWidth = 0; // remove the focus outline
    20           i.style.position = "absolute";
    21           document.body.clientWidth;
    22           document.documentElement.removeAttribute("class");
    23         }, 0);
    24       };
    25     </script>
    26   </body>
    27 </html>

mercurial