Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

180
Vistas
Clicking up arrow on a react IMask number input breaks on safari

I have an integer input using react-imask, which works fine on google chrome. However on safari, when I click the arrows without focusing on the input first, (say from 10 to 11), it will add the new value to the start of the input i.e 1110.

These are my props being passed in:

 <InputInteger
                  required={true}
                  className={"w-[65px] text-center"}
                  min={0}
                  value={updatedStock}
                  onChange={(e) => setUpdatedStock(parseInt(e.target.value))}
               
                />

and this is the InputInteger component:

  <IMaskInput
    {...props}
    mask={Number}
    scale={0}
    lazy={false}
    min={props.min ?? 0}
    max={props.max ?? 9999}
    radix={"."}
    signed={false}
    mapToRadix={[","]}
    inputMode={"numeric"}
    value={props?.value?.toString()}
    onAccept={(value) => {
      if (!props.onChange) return;
      if (value === "0" && !props?.required) value = "";
      const payload = { target: { value: value } };
      return props.onChange(payload);
    }}
    onChange={undefined}
  />

enter image description here after I increase

As mentioned, this only seems to be an issue on safari.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda