mirror of
https://github.com/servo/servo
synced 2026-05-02 12:26:06 +02:00
39 lines
1.1 KiB
HTML
39 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
||
<meta charset='utf-8'>
|
||
<title>drag & drop – crash when drag is interrupted by dialogs</title>
|
||
<style>
|
||
body > div {
|
||
height: 200px;
|
||
width: 200px;
|
||
background-color: orange;
|
||
position: absolute;
|
||
top: 8px;
|
||
left: 8px;
|
||
}
|
||
body > div * {
|
||
display: none;
|
||
}
|
||
body > div + div {
|
||
background-color: navy;
|
||
left: 250px;
|
||
}
|
||
p {
|
||
margin-top: 220px;
|
||
}
|
||
</style>
|
||
|
||
<script>
|
||
window.onload = function() {
|
||
var doneonce = false;
|
||
document.getElementsByTagName('div')[0].ondragstart = function(e) {
|
||
alert( doneonce ? 'Dismiss this dialog. PASS if the browser does not crash.' : 'Dismiss this dialog. The browser should not crash. Without re-focusing the page first, try dragging the orange square a second time. If a second alert does not appear, release the drag, and then try dragging the orange square a third time.' );
|
||
doneonce = true;
|
||
};
|
||
};
|
||
</script>
|
||
|
||
<div draggable='true' itemscope></div><div></div>
|
||
|
||
<p>Try to drag the orange square onto the blue square.</p>
|
||
<noscript><p>Enable JavaScript and reload</p></noscript>
|