Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numeric input behaves strange in Safari #558

Closed
adrianschneider94 opened this issue Jul 17, 2019 · 2 comments
Closed

Numeric input behaves strange in Safari #558

adrianschneider94 opened this issue Jul 17, 2019 · 2 comments
Assignees
Labels
Type: Bug Bug reports and their fixes

Comments

@adrianschneider94
Copy link

Hi there, great package!

My issue are the numeric inputs (all packages except ant):
In Safari (and according to the HTML Standards) is target.value of the onChange-Event undefined, if the validation (HTML-standard) of the string fails.
This leads to the fact, that you can enter all letters (e.g. '8$%&') into the input field, but you won't get an error of the validator, as uniforms converts it in 'undefined'.

I've built a custom field based on cleave.js for my project which resolves the issue -- I think cleave.js could be useful for some other fields in uniforms.

Best wishes
Adrian Schneider

@radekmie radekmie self-assigned this Jul 21, 2019
@radekmie radekmie added the Type: Bug Bug reports and their fixes label Jul 21, 2019
@radekmie
Copy link
Contributor

Hi @adrianschneider94. I'm aware of that. That is because each NumField (except the one in uniforms-antd) have an internal class to fix numeric inputs handling in React < 16. There's even a comment to make it optional and I think that it's getting more and more important.

Just for the record - we won't use any external package for that, simply delegate it to React (but still try to do our best in older versions).

@radekmie
Copy link
Contributor

I've prepared a possible solution on adaptive-num-field branch. Will let you know after some inhouse tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Bug reports and their fixes
Projects
Archived in project
Development

No branches or pull requests

2 participants