dotnet / dotnet/aspnetcore

DataTransfer in DragEventArgs always empty

Open
#43,976 4 comments 5 reactions 0 assignees View on GitHub
area-blazor enhancement
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 10h
Merged PRs (30d)
281

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Describe the bug

When you use the blazor version of ondrop ( `@ondrop` ) you get an DragEventArgs parameter. This DragEventArgs has an DataTransfer property ( like the js version ). But this DataTransfer is always empty.

### Expected Behavior

You should get the populated DataTransfer.

### Steps To Reproduce

1. define the draggable attribute on an element
2. define ondragstart ( js-version ) ( on the same element as 1. ) and set data to the dataTransfer property of the event parameter
3. define ondrop ( blazor-version ) and just output DataTransfer property of the DragEventArgs parameter
4. drag element from 1. onto the element of 3.
( 5. See your output that show an empty DataTransfer )

### Exceptions (if any)

_No response_

### .NET Version

6.0.108

### Anything else?

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.