2011-11-19 01:47:40 +04:00
|
|
|
<html class="reftest-wait">
|
|
|
|
<head>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
|
|
<script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
|
|
|
|
</head>
|
|
|
|
<body onload="start()">
|
2017-08-01 11:59:22 +03:00
|
|
|
<iframe srcdoc="<body contenteditable spellcheck=false>foo bar"></iframe>
|
2011-11-19 01:47:40 +04:00
|
|
|
<script>
|
|
|
|
function start() {
|
|
|
|
var iframe = document.querySelector("iframe");
|
|
|
|
var win = iframe.contentWindow;
|
|
|
|
var doc = iframe.contentDocument;
|
|
|
|
|
|
|
|
// Reframe the iframe
|
|
|
|
iframe.style.display = "none";
|
|
|
|
document.body.clientWidth;
|
|
|
|
iframe.style.display = "";
|
|
|
|
document.body.clientWidth;
|
|
|
|
|
|
|
|
setTimeout(function() {
|
2014-01-25 20:59:34 +04:00
|
|
|
doc.body.focus();
|
2011-11-19 01:47:40 +04:00
|
|
|
|
|
|
|
// Now try to move the caret
|
2012-01-27 01:40:25 +04:00
|
|
|
win.getSelection().collapse(doc.body.firstChild, 0);
|
2011-11-19 01:47:40 +04:00
|
|
|
synthesizeKey("VK_RIGHT", {});
|
|
|
|
|
|
|
|
document.documentElement.removeAttribute("class");
|
|
|
|
}, 0);
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|