tor-browser

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

moving-window.html (1529B)


      1 <!DOCTYPE html>
      2 <title>drag &amp; drop - moving windows must not start a drag</title>
      3 <script type="text/javascript">
      4 
      5 window.onload = function() {
      6  var li1 = document.getElementsByTagName('li')[3], li2 = document.getElementsByTagName('li')[4];
      7  li1.ondragstart = li2.ondragstart = function(e) {
      8    e.dataTransfer.effectAllowed = 'copy';
      9    e.dataTransfer.setData('Text', 'dummy text');
     10    this.innerHTML = 'FAIL';
     11  };
     12  li1.onmousedown = function () { window.moveBy(0,10); };
     13  li2.onmousedown = function () { setTimeout(function () {
     14    window.moveBy(0,10);
     15  },10); };
     16 };
     17 
     18 </script>
     19 <p></p>
     20 <ol>
     21  <li onclick="window.open(location.href,'_blank','width=500,height=300');">Click here to open this page in a popup window.</li>
     22  <li>Ensure that this popup window is not maximised (or tab, in the case of tabs being rendered as an MDI).</li>
     23  <li>Ensure that your browser settings allow browser windows to be moved by scripts.</li>
     24  <li draggable='true'>Press your mouse down on this text but do not move it afterwards. Fail if a drag operation has started (eg. if the mouse cursor shows that you are dragging something, or if some drag placeholder text appears, or if this text changes).</li>
     25  <li draggable='true'>Press your mouse down on this text but do not move it afterwards. Fail if a drag operation has started (eg. if the mouse cursor shows that you are dragging something, or if some drag placeholder text appears, or if this text changes).</li>
     26 </ol>
     27 <noscript><p>Enable JavaScript and reload</p></noscript>