969773.html (858B)
1 <!DOCTYPE html> 2 <html class="reftest-wait"> 3 <head> 4 <meta charset="utf-8"> 5 <title>Contenteditable Selection Test Case</title> 6 <script> 7 function runTests() { 8 var editable = document.getElementById("editable"); 9 var text = document.getElementById("text"); 10 11 editable.focus(); 12 13 setTimeout(function () { 14 editable.setAttribute("contenteditable", "false"); 15 text.focus(); 16 setTimeout(function () { 17 document.body.offsetHeight; 18 document.documentElement.removeAttribute('class'); 19 }, 0); 20 }, 0); 21 } 22 document.addEventListener('MozReftestInvalidate', runTests); 23 </script> 24 </head> 25 <body> 26 <div id="editable" contenteditable="true" tabindex="0" spellcheck="false">This is a contenteditable.</div> 27 <div id="text" tabindex="0">This is focusable text</div> 28 </body> 29 </html>