scrollIntoView-horizontal.html 1.8 KB

123456789101112131415161718192021222324252627282930313233
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  2. "http://www.w3.org/TR/html4/strict.dtd">
  3. <html lang="en">
  4. <head>
  5. </head>
  6. <body>
  7. <p><b>BUG ID</b> <a href="rdar://problem/3471901">3471901</a> support scrollIntoView method for DOM elements (3474)</p>
  8. <p id="test" style="background-color:skyblue; padding:3px;"><b>STEPS TO TEST:</b>
  9. Following the numbered steps on each button, click each button to scroll the next button into view.</p>
  10. <p id="success" style="background-color:palegreen; padding:3px;"><b>TEST PASS:</b>
  11. Next button scrolls into view as specified.</p>
  12. <p id="failure" style="background-color:#FF3300; padding:3px;"><b>TEST FAIL:</b>
  13. Next button does not scroll into view, or the button is scrolled to the wrong positon (top, bottom).
  14. </p>
  15. <input id="topleft" type="button" value="STEP 1: click to horizontally scroll STEP 2 into view" onclick="document.getElementById('topright').scrollIntoView(false);">
  16. <input id="topright" type="button" value="STEP 2: click to scroll STEP 3 to BOTTOM of view" style="position: absolute; left: 1200px;" onclick="document.getElementById('bottomleft').scrollIntoView(false);">
  17. <div style="height: 500px; width: 1200px; border: 1px solid;">here is a big empty div</div>
  18. <input id="bottomleft" type="button" value="STEP 3: click to scroll STEP 4 to TOP of view" style="position: absolute; top: 1200px;" onclick="document.getElementById('bottomright').scrollIntoView(true);">
  19. <input id="bottomright" type="button" value="STEP 4: click to scroll STEP 1 to TOP of view (then you're done)" style="position: absolute; top: 1200px; left: 1200px;" onclick="document.getElementById('topleft').scrollIntoView();">
  20. <div style="height: 500px; width: 1200px; border: 1px solid; position: absolute; top: 1300px;">here is a big empty div</div>
  21. </body>
  22. </html>