stale-scrollbar-client-crash.html 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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/5523503">rdar://problem/5523503</a> Safari crashes clicking scroll bar in FaceBook 'Trips'</p>
  8. <p id="test" style="background-color:skyblue; padding:3px;"><b>STEPS TO TEST:</b>
  9. Drag the scroll thumb in each of the vertical scrollbars below.
  10. </p>
  11. <p id="success" style="background-color:palegreen; padding:3px;"><b>TEST PASS:</b>
  12. Each scrollbar will disappear when clicked, along with the box containing it, but the browser will not crash as you continue to drag.
  13. </p>
  14. <p id="failure" style="background-color:#FF3300; padding:3px;"><b>TEST FAIL:</b>
  15. The scrollbar will disappear and Safari will crash as you continue dragging.
  16. </p>
  17. <div style="height: 120px;">
  18. <div id="overflow" style="overflow: auto; height: 100px; width: 100px; background-color: lightblue;">
  19. <div style="height: 200px;"></div>
  20. </div>
  21. </div>
  22. <div>
  23. <select multiple="true" id="listbox" style="height: 100px; width: 100px;">
  24. <option>One</option>
  25. <option>Two</option>
  26. <option>Three</option>
  27. <option>Four</option>
  28. <option>Five</option>
  29. <option>Six</option>
  30. <option>Seven</option>
  31. <option>Eight</option>
  32. <option>Nine</option>
  33. <option>Ten</option>
  34. </select>
  35. </div>
  36. <script>
  37. var overflow = document.getElementById("overflow");
  38. var listbox = document.getElementById("listbox");
  39. function mousedown(event)
  40. {
  41. if (event.target.id)
  42. setTimeout(event.target.id + '.style.display = "none"', 0);
  43. }
  44. overflow.addEventListener("mousedown", mousedown, false);
  45. listbox.addEventListener("mousedown", mousedown, false);
  46. </script>
  47. </body>
  48. </html>