You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior
Observe the console output while dragging the sliders. For the first slider, the behavior is incorrect and it fires onChange while dragging the slider. For the second slider, the behavior is correct, and can be seen as a workaround for the incorrect behavior.
Hey @woutervh-, thanks for the report. This is expected behavior, as React normalizes the onChange event so it's consistent across browsers. See @spicyj's comment #2454 (comment):
Our plan here is to make onChange consistently fire on every change in all browsers; see #554. You can use onBlur or maybe onMouseUp if that's the behavior you're looking for, but the native onChange event varies widely across browsers even if we don't do anything special in React so that's probably not what you want.
React version 15.3.0
Chrome version 52.0.2743.116 m (64-bit)
Current behavior:
React fires onChange events for
<input>
with typerange
even when the browser's inputchange
event does not fire.Example:
Try it here
Expected behavior
Observe the console output while dragging the sliders. For the first slider, the behavior is incorrect and it fires
onChange
while dragging the slider. For the second slider, the behavior is correct, and can be seen as a workaround for the incorrect behavior.Reference:
https://www.impressivewebs.com/onchange-vs-oninput-for-range-sliders/
The text was updated successfully, but these errors were encountered: