final-form / react-final-form

🏁 High performance subscription-based form state management for React
https://final-form.org/react
MIT License
7.39k stars 481 forks source link

Using ReactDOM.unstable_createRoot, clicking a label does not toggle the related checkbox. #600

Open robsco-git opened 5 years ago

robsco-git commented 5 years ago

It may not be appropriate to submit this as React concurrent mode has not been officially released but anyway here goes.

Are you submitting a bug report or a feature request?

Bug report.

What is the current behavior?

Using ReactDOM.unstable_createRoot, clicking on a label does not toggle the related checkbox/input. One can double click a label to toggle the checkbox. Clicking the actual <input /> works as expected.

What is the expected behavior?

Using ReactDOM.unstable_createRoot, single clicking a label toggles the checked state of the related <input />.

Sandbox Link

https://codesandbox.io/s/react-final-form-simple-example-f2ojr?fontsize=14

What's your environment?

The codesandbox.io link above. Forked from the "Simple Example".

Other information

Nope.

flybayer commented 3 years ago

This is still broken with the latest react experimental version.

From my investigation, this is not a bug in React but a bug in final-form. A few other libraries like Chakra also have the same issue.