styleguide
styleguide copied to clipboard
Mouse click not working in NumericStepper component when device has touch screen
Describe the bug When the user clicks with mouse on the component's buttons from a device with touch screen, they don't work. This behavior is considered a bug since it affects touch screen laptops or other devices with a mouse.
To Reproduce Steps to reproduce the behavior:
- Add the component to your react app.
initialState = {
value1: 0,
}
<div className="mb5 flex">
<NumericStepper
label="Small"
size="small"
value={state.value1}
onChange={event => setState({ value1: event.value })}
/>
</div>
- Set the onChange event handler.
- In your frontend click the +/- buttons with the mouse from a touch screen device.
- See error (nothing happen with the onChange event handler).
Expected behavior The event handler should be called even if the user clicks the mouse from a touch screen device.
Additional context Remember test it with mouse from touch device.