styleguide icon indicating copy to clipboard operation
styleguide copied to clipboard

Mouse click not working in NumericStepper component when device has touch screen

Open AguilarJorge opened this issue 2 years ago • 0 comments

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:

  1. 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>
  1. Set the onChange event handler.
  2. In your frontend click the +/- buttons with the mouse from a touch screen device.
  3. 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.

AguilarJorge avatar Jun 09 '22 01:06 AguilarJorge