Update forms.md (#8121)
王晓勇 committed
Oct 27, 2016 at 17:26 UTC
e3688d1fa3a69a2a893b79759eb759ac9a51a8a9
1 file changed
+1
-1
docs/docs/forms.md
+1
-1
@@ -98,7 +98,7 @@ Controlled components also let us reset inputs to arbitrary values by setting th
98
99
### Potential Issues With Checkboxes and Radio Buttons
100
101
-Be aware that, in an attempt to normalize change handling for checkbox and radio inputs, React listens to a `click` browser event to implement the `onChange` event.
101
+Be aware that, in an attempt to normalize change handling for checkboxes and radio inputs, React listens to a `click` browser event to implement the `onChange` event.
102
103
For the most part this behaves as expected, except when calling `preventDefault` in a `change` handler. `preventDefault` stops the browser from visually updating the input, even if `checked` gets toggled. This can be worked around either by removing the call to `preventDefault`, or putting the toggle of `checked` in a `setTimeout`.
104