focusring-1.html 947 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <!DOCTYPE HTML>
  2. <html class="reftest-wait"><head>
  3. <meta charset="utf-8">
  4. <title>Testcase #1 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><option>1<option>2</select>
  17. <input>
  18. <script>
  19. function runTests() {
  20. var s = document.querySelector("select");
  21. var b = document.querySelector("input");
  22. s.focus();
  23. document.body.offsetHeight;
  24. setTimeout(function(){ s.style.display = 'none'; document.body.offsetHeight; }, 2);
  25. setTimeout(function(){ b.focus(); document.body.offsetHeight; }, 3);
  26. setTimeout(function(){ s.style.display = 'inline'; document.body.offsetHeight; }, 4);
  27. setTimeout(function(){ document.documentElement.removeAttribute("class"); }, 100);
  28. }
  29. window.focus();
  30. window.addEventListener("MozReftestInvalidate", runTests, false);
  31. </script>
  32. </body>
  33. </html>