insin / react-maskedinput

Masked <input/> React component
http://insin.github.io/react-maskedinput/
MIT License
730 stars 197 forks source link

Component doesn't submit in mozilla firefox #90

Open antoniotaha opened 7 years ago

antoniotaha commented 7 years ago

Masked input doesn't submit when I run my application in Firefox. The problem ocurr when I try to submit my form pressing enter in the masked field. I think that is because:

In function onKeyPress it has

if (e.metaKey || e.altKey || e.ctrlKey || e.key === 'Enter') { return; }

but the key is NULL when I press enter in the field, then

e.preventDefault() stop my submit.