Bug 243374 - dragend event doesn't have dragged content unlike drop event
Summary: dragend event doesn't have dragged content unlike drop event
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: HTML Editing (show other bugs)
Version: Safari 15
Hardware: Mac (Apple Silicon) macOS 12
: P2 Normal
Assignee: Nobody
URL: https://jsfiddle.net/3vjnqdmw/show
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-07-30 10:49 PDT by Ahmad Saleem
Modified: 2022-08-06 14:20 PDT (History)
6 users (show)

See Also:


Attachments
safari, firefox, chrome console log for event.dataTransfer (209.28 KB, image/png)
2022-07-31 20:09 PDT, Karl Dubost
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2022-07-30 10:49:51 PDT
Hi Team,

Thanks for your continuous effort.

I took the example data from below mentioned source and changed it into JSFiddle:

JSFiddle Link - https://jsfiddle.net/3vjnqdmw/show

Source - http://udn.realityripple.com/docs/Web/API/DataTransfer/clearData

Now I experience following bug:

*** STEPS TO REPRODUCE ***

1. Open JSFiddle and Run
2. Drag and Drag [Select this element...] into [Drop Zone]

>> ACTUAL RESULT:

Status: Drop done
Data is: empty

>> EXPECTED RESULT:

Status: Drop done
Data is: source

_____

Other browsers:

Chrome Canary 106 -> same as Safari 15.6

Firefox Nightly 105 -> Show "Expected Result".

_______

Thanks for your continuous work, please mark it as duplicate since I am not able to find related bug. Hence, I am filing this.
Comment 1 Ryosuke Niwa 2022-07-31 12:39:24 PDT
This isn't really an issue with clearData but rather with dragend event getting dispatched without the drag content.
Comment 2 Karl Dubost 2022-07-31 20:09:49 PDT
Created attachment 461328 [details]
safari, firefox, chrome console log for event.dataTransfer

Firefox Nightly 105.0a1
Google Chrome Canary 106.0.5212.0
Safari 16.0


According to
https://html.spec.whatwg.org/multipage/dnd.html#dndevents

The drag data store mode is 
drop    -> read-only mode
dragend -> protected mode


Protected mode.
https://html.spec.whatwg.org/multipage/dnd.html#concept-dnd-p

> For all other events. The formats and kinds in the drag data store list of items representing dragged data can be enumerated, but the data itself is unavailable and no new data can be added.


*data itself is unavailable*
So would it be a bug from Firefox?
Comment 3 Karl Dubost 2022-08-01 18:36:24 PDT
I opened https://bugzilla.mozilla.org/show_bug.cgi?id=1782633
Comment 4 Radar WebKit Bug Importer 2022-08-06 10:50:16 PDT
<rdar://problem/98247037>
Comment 5 Ryosuke Niwa 2022-08-06 14:20:25 PDT
I think this is config changed since WebKit's behavior is probably right here.