Skip to content

EventForDotNet.ts - DataTransfer event object is not parsed #18839

Closed
@Ellested

Description

@Ellested

The DataTransfer field is always null and data is never passed to the .net code.
I assume that the dataTransfer property has to be a clone of the DOM event, in order for the data to be passed to Blazor. It's actually also necessary to return the dataTransfer object, if you want .net code to modify the dropEffect and effectAllowed. I'm not sure whether Blazor JSInterop supports modifcation off the event and pass it back to JS - but it would be nice :-)

function parseDragEvent(event: any) {
return {
...parseMouseEvent(event),
dataTransfer: event.dataTransfer,
};
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions