tor-browser

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

061-manual.html (1036B)


      1 <!doctype html>
      2 <title>drag &amp; drop - dragging elements by overflowing children that are positioned outside them</title>
      3 <style type="text/css">
      4 div {
      5  height: 200px;
      6  width: 200px;
      7  background: blue;
      8  white-space: nowrap;
      9  position: relative;
     10 }
     11 span {
     12  display: block;
     13  top: 0;
     14  left: 210px;
     15  position: absolute;
     16  width: 100px;
     17  height: 100px;
     18  background: yellow;
     19 }
     20 </style>
     21 <script type="text/javascript">
     22 window.onload = function () {
     23  document.getElementsByTagName('div')[0].ondragstart = function (e) {
     24    e.dataTransfer.effectAllowed = 'copy';
     25    e.dataTransfer.setData('text','dummy text');
     26  };
     27 };
     28 </script>
     29 <div draggable="true"><span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Drag me</span></div>
     30 <p>Drag the above text sideways. Pass if the drag placeholder shows that the text and both the yellow and blue squares are being dragged.</p>