-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
fix(input-number): when zero is entered, value displayed isn't expected #4747
fix(input-number): when zero is entered, value displayed isn't expected #4747
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
If this solution works, I'll optimize the code again. |
It breaks the Horizontal with Step demo. Firstly delete all input and type some number and then try to type '.'. And compare the behavior with live demo. |
6884a1c
to
60b3806
Compare
Okay, I've made the adjustments. |
Thanks for your updates. This time it breaks Germany currency. First, delete all the input, type some numbers, then type |
Okay, I think making these adjustments should solve the problem. const re = /[.,]/g;
const newSelectionEnd = selectionEnd + Number(re.test(value) || re.test(insertedValueStr));
this.$refs.input.$el.setSelectionRange(newSelectionEnd, newSelectionEnd); |
I'm sorry for not getting back to you sooner. The last updates are working as desired. We're planning to add this PR for the next version. If you add the update, we gladly merge it. |
Fix #4539