Source code

Revision control

Copy as Markdown

Other Tools

<?xml version="1.0" encoding="utf-8"?>
<title>Selection drag and drop: events after drag is cancelled</title>
<script type="application/ecmascript">
function selectText()
function dragMe(event)
function dropIt(event)
{say('FAIL (no drop should occur after drag is cancelled)')}
function say(it)
{document.querySelector('pre').appendChild(document.createTextNode(it + '\n'));}
<body onload="selectText()" dropzone="copy string:text/plain" ondrop="dropIt(event)">
<p ondrag="dragMe(event)">Try to drag me</p>
<p>You should not be able to drop text selection above.</p>