Skip to content

Preventing paste works on browser but not during the test #316

Closed
@ematipico

Description

@ematipico
  • react-testing-library version: 5.2.0
  • react version: 16.7.0
  • node version: 16.7.0
  • npm (or yarn) version: npm

Relevant code or config:

Sandbox: https://codesandbox.io/s/40nwnrv650

What you did:

Preventing the paste functionality on a single input. Used the evt.preventDefault().

What happened:

The input sets the value

Reproduction:

Sandbox: https://codesandbox.io/s/40nwnrv650

Problem description:

When pasting on the input, the value should not be set

Suggested solution:

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    jsdomIssue with JSDOM environment

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions