tor-browser

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

020.xhtml (764B)


      1 <?xml version="1.0" encoding="utf-8"?>
      2 <html xmlns="http://www.w3.org/1999/xhtml">
      3 <head>
      4 <title>Text input selection drag and drop: events after drag is cancelled</title>
      5 <script type="application/ecmascript">
      6 function selectText()
      7  {document.querySelector('input').select()}
      8 function dragMe(event)
      9  {event.preventDefault();}
     10 function dropIt(event)
     11  {say('FAIL (no drop should occur after drag is cancelled)')}
     12 function say(it)
     13  {document.querySelector('pre').appendChild(document.createTextNode(it + '\n'));}
     14 </script>
     15 </head>
     16 <body onload="selectText()" dropzone="copy string:text/plain" ondrop="dropIt(event)">
     17 <p><input value="Try to drag me" ondrag="dragMe(event)"/></p>
     18 <p>You should not be able to drop text selection above.</p>
     19 <pre/>
     20 </body>
     21 </html>