-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 #5232
fix(input-number): when zero is entered, value displayed isn't expected #5232
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
Thanks a lot for your contribution! But, PR does not seem to be linked to any issues. Please manually link to an issue or mention it in the description using #<issue_id>. |
If this solution works, I'll optimize the code again. |
@betavs so the only real change is this line? inputEl.setSelectionRange(selectionEnd + 1, selectionEnd + 1); to inputEl.setSelectionRange(selectionEnd, selectionEnd); ??? |
Yes, but I think it can be optimized to if (['insert', 'delete-back-single', 'delete-range', 'spin'].includes(operation)) {
inputEl.setSelectionRange(selectionEnd, selectionEnd);
} else if (operation === 'delete-single') {
inputEl.setSelectionRange(selectionEnd - 1, selectionEnd - 1);
} |
OK can you update your PR for your optimization so I can test it. |
Thanks a lot for your contribution! But, PR does not seem to be linked to any issues. Please manually link to an issue or mention it in the description using #<issue_id>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and looking good to me.
From primefaces/primevue#4539
Fix #5234