Skip to content

Real DataTransferItem.getAsString() breaks Clipboard methodsΒ #1249

@ph-fritsche

Description

@ph-fritsche

Reproduction example

https://codesandbox.io/p/sandbox/datatransferitem-getasstring-t693n7

Prerequisites

  1. Create DataTransferItem
  2. Read data of item per DataTransferItem.getAsString()

Expected behavior

Callback is called on new event loop step.

Actual behavior

The stub calls the callback immediately.

User-event version

14.5.2

Environment

Testing Library framework:

JS framework:

Test environment:

DOM implementation:

Additional context

The Clipboard methods rely on the immediate call of the callback and therefore break when the browser implementation of DataTransferItem is used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions