2 <title>drag
& drop - closing a popup while a drag is in operation out of the window
</title>
3 <style type=
"text/css">
4 p
.gone
, ul
{ display: none
; }
5 p
.gone
+ ul
{ display: block
; }
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);
17 <p><a href=
"javascript:alert('Click the link normally');" onclick=
"window.open('close-drag-003.html#popup','_blank');return false;">Open this page in a popup
</a>.
</p>
19 <li>Close all pages/browser windows except the popup.
</li>
20 <li>Ensure that the browser window is not maximised.
</li>
21 <li>Quickly drag this text out of the browser window (not over the taskbar), and do not release the drag.
</li>
22 <li>The browser may optionally cancel the drag. The browser may optionally close the popup/window. Fail if the drag placeholder gets stuck. Fail if the browser crashes. Fail if anything horrible happens. Fail if your grandmother does not invite you over for Christmas.
</li>
23 <li>After
2 seconds, fail if the address field shows that the page has closed, but it is still visibly rendered.
</li>
24 <li>Continue dragging back into the browser window (if it is still open).
</li>
25 <li>Release the drag.
</li>
26 <li>Fail if the drag placeholder gets stuck. Fail if the browser crashes or hangs.
</li>
28 <noscript><p>Enable JavaScript and reload
</p></noscript>