tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

dialog-001.html (1083B)


      1 <!DOCTYPE html>
      2 <meta charset='utf-8'>
      3 <title>drag &amp; drop – crash when drag is interrupted by dialogs</title>
      4 <style>
      5  body > div {
      6    height: 200px;
      7    width: 200px;
      8    background-color: orange;
      9    position: absolute;
     10    top: 8px;
     11    left: 8px;
     12  }
     13  body > div * {
     14    display: none;
     15  }
     16  body > div + div {
     17    background-color: navy;
     18    left: 250px;
     19  }
     20  p {
     21    margin-top: 220px;
     22  }
     23 </style>
     24 
     25 <script>
     26 window.onload = function() {
     27  var doneonce = false;
     28  document.getElementsByTagName('div')[0].ondragstart = function(e) {
     29    alert( doneonce ? 'Dismiss this dialog. PASS if the browser does not crash.' : 'Dismiss this dialog. The browser should not crash. Without re-focusing the page first, try dragging the orange square a second time. If a second alert does not appear, release the drag, and then try dragging the orange square a third time.' );
     30    doneonce = true;
     31  };
     32 };
     33 </script>
     34 
     35 <div draggable='true' itemscope></div><div></div>
     36 
     37 <p>Try to drag the orange square onto the blue square.</p>
     38 <noscript><p>Enable JavaScript and reload</p></noscript>