React-number-format: Safari iOS autofill with react-number-format allowEmptyFormatting

Created on 29 Oct 2020  路  3Comments  路  Source: s-yadav/react-number-format

Hello! I use ReactNumberFormat input with phone mask and allowEmptyFormatting prop. Safari on iOS offers to autofill value from contacts. But after autofilling input is again only with empty mask (with yellow background-color, because is was autocompleted).
Code example (a part of your live demo codepen):

<div className="example">
    <h3>
         Show mask on empty input (phone)
     </h3>
     <NumberFormat format="+1 (###) ###-####" mask="_" allowEmptyFormatting />
</div>

P.S.: If I use the same example without allowEmptyFormatting prop, value autofills correctly.

bug

Most helpful comment

+1 the same for google chrome autocomplete

All 3 comments

+1 the same for google chrome autocomplete

Any updates?

The fix for this issue has been merged and released. Thanks again for reporting!

Was this page helpful?
0 / 5 - 0 ratings