OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <script src="../../resources/testharness.js"></script> | |
3 <script src="../../resources/testharnessreport.js"></script> | |
4 <body> | |
5 <div style="overflow-x: hidden;"> | |
6 <div id = "mydiv" style="position: absolute;" /> | |
7 </div> | |
8 </body> | |
9 <script type="text/javascript"> | |
10 window.onload = function() { | |
11 for (var i = 0; i < 500; ++i) { | |
12 var br = document.createElement('br'); | |
13 document.getElementById("mydiv").appendChild(br); | |
14 } | |
15 | |
16 test(function(t) { | |
17 var focusable = document.createElement("input"); | |
18 document.getElementById("mydiv").appendChild(focusable); | |
bokan
2016/09/13 14:38:46
The test would be more clear if you didn't dynamic
| |
19 focusable.focus(); | |
20 assert_not_equals(window.scrollY, 0); | |
21 }, "Tests that for an element with absolute position and whose parent has ov erflowclip, it can still scroll automatically."); | |
22 } | |
23 </script> | |
OLD | NEW |