WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
178058
dataTransfer.effectAllowed returns "all" when it's set to "copy" or "move" during dragstart
https://bugs.webkit.org/show_bug.cgi?id=178058
Summary
dataTransfer.effectAllowed returns "all" when it's set to "copy" or "move" du...
Ryosuke Niwa
Reported
2017-10-07 19:05:15 PDT
When dataTransfer.effectAllowed to set to "copy", "move", etc... during dragstart, a subsequent drag event's dataTransfer's effectAllowed always returns "all"
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2017-10-07 19:05:42 PDT
<
rdar://problem/34874174
>
Wenson Hsieh
Comment 2
2017-10-07 19:21:50 PDT
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>
Vishnu
Comment 3
2019-10-14 22:54:01 PDT
Setting effectAllowed to 'copy' or 'move' has no effect in safari. The effectAllowed is always copyMove
Devon Govett
Comment 4
2022-09-01 18:28:58 PDT
This is still a problem. The behavior is slightly different on macOS and iOS: * On macOS, effectAllowed is always "copyMove" in the dragover event regardless of what was set during dragstart, unless a modifier key is set, in which case it is filtered to either copy or move. This also means that dropEffect can never be set to "link", and holding the Control key results in effectAllowed being set to "none" rather than "link". For drags initiated outside the browser, e.g. in Finder, effectAllowed is always "all" rather than "copyMove", and "link" operations work as expected. * On iOS, effectAllowed is always "all". Modifier keys have no effect.
Ahmad Saleem
Comment 5
2024-02-07 21:43:54 PST
*** Safari Technology Preview 188 *** Copymove *** Chrome Canary 123 *** Does not allow 'text' selection but show 'move' when selected *** Firefox Nightly 124 *** Does not show any text like `copy move` or `move` but just:
>> Setting the effect allowed to move!
____ Just wanted to share up-to-date test results.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug