Skip to content

Pointer Events check sometimes returns false positives #922

@MattyBalaam

Description

@MattyBalaam

Reproduction example

https://codesandbox.io/s/exciting-fire-b1ibfk?file=/src/App.test.js

Prerequisites

If you run a userEvent.click on an element which then has pointer-events: none added after the interaction, then the next userEvent.clickon a different element thinks the element inherits pointer-events: none

Expected behavior

userEvent.click should not throw a warning.

Actual behavior

Error thrown “Unable to perform pointer interaction as the element has or inherits pointer-events set to "none".”

User-event version

14.0.4

Environment

See sandbox, which is using React 18. I also see the issue in React 17 locally.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreleased

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions