1429027-1.html (668B)
1 <!DOCTYPE html> 2 <html class="reftest-wait"> 3 <head> 4 <title>Bug 1429027 - No caret</title> 5 <meta charset="utf-8"> 6 </head> 7 <body> 8 <form autocomplete="off"> 9 <input autofocus value="test"> 10 </form> 11 12 <script type="text/javascript"> 13 function done() { 14 document.documentElement.removeAttribute("class"); 15 } 16 17 function focus() { 18 document.querySelector("input").focus(); 19 setTimeout(done, 0); 20 } 21 22 function clearInput() { 23 document.querySelector("input").value = ""; 24 setTimeout(focus, 0); 25 } 26 27 function doTest() { 28 document.querySelector("input").focus(); 29 setTimeout(clearInput, 0); 30 } 31 32 window.addEventListener("MozReftestInvalidate", doTest); 33 </script> 34 </body> 35 </html>