close-drag-006-manual.html (1233B)
1 <!doctype html> 2 <title>drag & drop - dropping on window decoration after source tab is closed</title> 3 <style type="text/css"> 4 p.gone, ul { display: none; } 5 p.gone + ul { display: block; } 6 </style> 7 <script type="text/javascript"> 8 window.onload = function() { 9 if( location.href.match(/#popup$/) ) { document.getElementsByTagName('p')[0].className = 'gone'; } 10 document.getElementsByTagName('ul')[0].ondragstart = function(e) { 11 e.dataTransfer.effectAllowed = 'copy'; 12 e.dataTransfer.setData('Text', 'dummy text'); 13 setTimeout(function () { window.close(); },2000); 14 }; 15 }; 16 </script> 17 <p><a href="javascript:alert('Click the link normally');" onclick="window.open('close-drag-006.html#popup','_blank');return false;">Open this page in a popup</a>.</p> 18 <ul draggable='true'> 19 <li>Ensure the browser window is not maximised.</li> 20 <li>Quickly drag this text upwards out of the browser window, and do not release the drag.</li> 21 <li>This tab should close after a couple of seconds.</li> 22 <li>Dragging downwards over the browser window's title bar, then release the drag.</li> 23 <li>Fail if the drag placeholder gets stuck. Fail if the browser crashes.</li> 24 </ul> 25 <noscript><p>Enable JavaScript and reload</p></noscript>