tor-browser

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

010.html (1462B)


      1 <!doctype html>
      2 <title>Alert during dragleave</title>
      3 <style>
      4  body > div {
      5    height: 200px;
      6    width: 200px;
      7    background-color: orange;
      8    display: inline-block;
      9  }
     10  body > div + div {
     11    background-color: navy;
     12  }
     13 </style>
     14 <script type="text/javascript">
     15 window.onload = function () {
     16  var orange = document.getElementsByTagName('div')[0], blue = document.getElementsByTagName('div')[1];
     17  orange.ondragstart = function (e) {
     18    e.dataTransfer.setData('text','PASS');
     19    e.dataTransfer.effectAllowed = 'all';
     20  };
     21  blue.ondragenter = blue.ondragover = function (e) {
     22    e.preventDefault();
     23  };
     24  blue.ondragleave = function (e) {
     25    alert('JS alert');
     26  };
     27 };
     28 </script>
     29 <div draggable="true"></div>
     30 <div></div>
     31 
     32 <ol>
     33  <li>Drag the orange square over the blue square, then back over the orange square.</li>
     34  <li>An alert may appear - release the mouse over the page, not the dialog. Dismiss it (you may need to use keyboard or mouse gestures such as gesture-down,gesture-right). If it does not appear, release the drag.</li>
     35  <li>The mouse cursor may continue to show that a drag is in operation. If so, attempt to select some of this text with the mouse before continuing to the text step.</li>
     36  <li>Fail if the mouse continues to show that a drag is in operation.</li>
     37  <li>Try to select some text in this sentence. Fail if it is not possible.</li>
     38  <li>Try to drag the orange square downwards. Fail if it is not possible.</li>
     39 </ol>