Skip to content

onChange doesn't fire if a capture-phase document listener for the underlying native event calls setState() #12643

@Reaverart

Description

@Reaverart

Do you want to request a feature or report a bug?
A bug

What is the current behavior?
Checkbox not fires onChange for controlled component, it somehow related to global event listeners with setState, see sandbox example.

What is the expected behavior?
Checkbox should fire onChange handler

Broken example with REACT 16:
https://codesandbox.io/s/8y6jv95k18

Working example with REACT 15 version:
https://codesandbox.io/s/rl3w4nqqzm

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions