1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/editor/reftests/caret_on_presshell_reinit.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,22 @@ 1.4 +<!DOCTYPE html> 1.5 +<html> 1.6 + <body> 1.7 + <div> 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 div = document.querySelector("div"); 1.13 + div.style.position = "absolute"; 1.14 + document.body.clientWidth; 1.15 + var iframe = document.querySelector("iframe"); 1.16 + var win = iframe.contentWindow; 1.17 + var body = win.document.body; 1.18 + iframe.focus(); 1.19 + body.focus(); 1.20 + var sel = win.getSelection(); 1.21 + sel.collapse(body.firstChild, 0); 1.22 + }; 1.23 + </script> 1.24 + </body> 1.25 +</html>