Skip to content

DataTransfer in DragEventArgs always empty #43976

@puschie286

Description

@puschie286

Is there an existing issue for this?

  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-blazorIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing one

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions