Skip to content

pointer: click closest common ancestor of pointerdown/pointerup #997

@ph-fritsche

Description

@ph-fritsche

Reproduction example

https://codesandbox.io/s/userevent-pointer-click-3f2x7d?file=/src/App.test.js

Prerequisites

  1. Render multiple elements.
  2. Add an event listener for click on a common ancestor.
  3. Drag a pointer from one element to another.

Expected behavior

click event is dispatched on closest common ancestor.

Actual behavior

No click event if the pointerup target is different than the pointerdown target.

User-event version

14.3.0

Environment

Testing Library framework:

JS framework:

Test environment:

DOM implementation:

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