[Webkit-unassigned] [Bug 178058] dataTransfer.effectAllowed returns "all" when it's set to "copy" or "move" during dragstart
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Sat Oct 7 19:21:50 PDT 2017
https://bugs.webkit.org/show_bug.cgi?id=178058
--- Comment #2 from Wenson Hsieh <wenson_hsieh at apple.com> ---
Small test case showing the problem:
<div id="source" draggable="true">Drag me!</div>
<script>
function write(text) {
let element = document.createElement("pre");
element.textContent = text;
document.body.appendChild(element);
}
function writeEffectAllowed(event) {
write(`(${event.type}): effectAllowed = ${event.dataTransfer.effectAllowed}`);
event.preventDefault();
}
source.addEventListener("dragstart", event => {
event.dataTransfer.effectAllowed = "move";
write("Setting the effect allowed to move!");
});
document.body.addEventListener("dragover", writeEffectAllowed);
document.body.addEventListener("drop", writeEffectAllowed);
</script>
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171008/c59af165/attachment.html>
More information about the webkit-unassigned
mailing list