Skip to content

The order of React's onMouseEnter/onMouseOver events is switched in Cypress #33074

@fknauf

Description

@fknauf

Current behavior

The order of React's synthesized MouseEnter/MouseOver and PointerEnter/PointerOver events is switched in Cypress. Both in Firefox and Chrome, React synthesizes Enter before Over while Cypress does it the other way around.

Desired behavior

Cypress should synthesize events in the same order as React.

Test code to reproduce

Clone https://github.com/fknauf/repro-react-spectrum-9122/tree/cypress-issue and follow instructions in the README.md

Cypress Version

15.7.1

Debug Logs

The debug logs were too long for this text field, so I attached them as a file: cypress.debug.log

Other

Arguably React's behavior is a bit odd, since both browsers natively generate Over before Enter in line with the uievents specification, but think Cypress should faithfully reproduce even odd behavior.

I noticed this while chasing another issue in another project, that's why the repro repo is called what it is. The cypress-issue branch there is dedicated to this issue and whittled down to the relevant minimum.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions