Skip to content

api.DataTransfer.files - incomplete information on safari: items not filled on drag event #24898

@mattcohen24

Description

@mattcohen24

What type of issue is this?

Missing compatibility information

What information was incorrect, unhelpful, or incomplete?

Safari has a caveat that other browsers don't encounter; safari obscures the files, so if developers are using items.length to verify the user is dragging files, that will not work on safari, but does on other browsers. safari only reveals that the user is dragging files through the dataTransfer.types property.

What browsers does this problem apply to, if applicable?

Safari

What did you expect to see?

items.length having non-zero length when user is dragging files.

Did you test this? If so, how?

trigger drag event with files on chrome and safari, items has values on chrome, items has no values on safari.

Can you link to any release notes, bugs, pull requests, or MDN pages related to this?

No response

Do you have anything more you want to share?

No response

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/items

MDN metadata

MDN page report details
  • Query: api.DataTransfer.files
  • Report started: 2024-10-31T17:44:13.331Z

Metadata

Metadata

Assignees

No one assigned

    Labels

    data:apiCompat data for Web APIs. https://developer.mozilla.org/docs/Web/API

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions