Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

179
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!