Skip to content

Bug: relatedTarget is undefined in firefox #19572

@zoltan-mihalyi

Description

@zoltan-mihalyi

React.MouseEvent#relatedTarget is undefined in firefox on windows (should be null)

React version: 16.12.0

Steps To Reproduce

  1. create an onMouseOut event listener on a html element
  2. move the mouse to the element
  3. move the mouse outside the window (the mouse should not enter other html elements in the process)

Link to code example: https://codesandbox.io/s/strange-wiles-c4ku2
In the example, if you move the mouse from the blue box to the top, you see the types of event.relatedTarget and event.nativeEvent.relatedTarget, you see "undefined, object".

The current behavior

when event.nativeEvent.relatedTarget is null, event.relatedTarget is undefined.

The expected behavior

event.relatedTarget should be null

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: UnconfirmedA potential issue that we haven't yet confirmed as a bug

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions