diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/html/editing/dnd/platform/interrupt/014.html | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/html/editing/dnd/platform/interrupt/014.html')
-rw-r--r-- | testing/web-platform/tests/html/editing/dnd/platform/interrupt/014.html | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/editing/dnd/platform/interrupt/014.html b/testing/web-platform/tests/html/editing/dnd/platform/interrupt/014.html new file mode 100644 index 0000000000..23f6a3e4db --- /dev/null +++ b/testing/web-platform/tests/html/editing/dnd/platform/interrupt/014.html @@ -0,0 +1,39 @@ +<!DOCTYPE html> +<title>drag & drop - drop interrupted by alert must not break mouse interaction with UI</title> +<style> + body > div { + height: 200px; + width: 200px; + background-color: orange; + } + body > div + div { + margin-top: 10px; + height: 200px; + width: 200px; + background-color: blue; + } +</style> + +<script> +window.onload = function() { + var orange = document.getElementsByTagName('div')[0], blue = document.getElementsByTagName('div')[1]; + orange.ondragstart = function(e) { + e.dataTransfer.effectAllowed = 'copy'; + e.dataTransfer.setData('text', 'dummy text'); + }; + blue.ondragover = blue.ondragenter = function(e) { + e.preventDefault(); + e.dataTransfer.dropEffect = 'copy'; + }; + blue.ondrop = function(e) { + e.preventDefault(); + alert('It should ideally be possible to dismiss this dialog with your mouse/pointing device (do not use mouse gestures).'); + }; +}; +</script> + +<p>Drag the orange square onto the blue square.</p> +<div draggable="true"></div> +<div></div> + +<noscript><p>Enable JavaScript and reload</p></noscript> |