focusring-3.html 866 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <!DOCTYPE HTML>
  2. <html class="reftest-wait"><head>
  3. <meta charset="utf-8">
  4. <title>Testcase #3 for bug 1253977</title>
  5. <style type="text/css">
  6. * { -moz-appearance:none; }
  7. :focus {
  8. border:2px solid black;
  9. }
  10. :-moz-focusring {
  11. outline: 2px dashed black;
  12. }
  13. </style>
  14. </head>
  15. <body>
  16. <select onfocus="continueTest1()"><option>1<option>2</select>
  17. <script>
  18. function continueTest1(){
  19. var s = document.querySelector("select");
  20. setTimeout(function(){ s.style.display = 'none'; }, 2);
  21. setTimeout(function(){ s.style.display = 'inline'; document.body.offsetHeight; }, 4);
  22. setTimeout(function(){ document.documentElement.removeAttribute("class"); }, 100);
  23. }
  24. function runTests(){
  25. var s = document.querySelector("select");
  26. s.focus();
  27. }
  28. window.focus();
  29. window.addEventListener("MozReftestInvalidate", runTests, false);
  30. </script>
  31. </body>
  32. </html>