editor/reftests/caret_on_presshell_reinit-2.html

branch
TOR_BUG_9701
changeset 3
141e0f1194b1
equal deleted inserted replaced
-1:000000000000 0:f40afa934e5f
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