Skip to content

Conversation

@swc
Copy link

@swc swc commented Apr 10, 2025

There have been some long-standing issues with InputNumber for nearly four years. I finally tracked it down to some flawed logic in concatValues.

To Reproduce
Navigate to the Prefix and Suffix section of the InputNumber docs and enter a 4-digit number in the "Mile" field. The insertion point jumps past the suffix.

This should resolve quite a few issues that don't necessarily seem related. At a minimum, it has been causing caret positioning issues when decimal places or suffixes are enabled. I will try to search for and tag as many related issues as I can. There are also some issues that were marked fixed that were not, so I'll tag those too.

This fix should also be pushed to v17 and v18 branches.

Open Issues
Fixes #16189
Fixes #16297
Fixes #16496
Fixes #17869
Fixes #17073

Erroneously closed issues
Fixes #9272
Fixes #10582
Fixes #14227

@swc swc marked this pull request as ready for review April 10, 2025 16:32
@swc swc changed the title Fixed a critical flaw in InputNumber.concatValues() fix: critical flaw in InputNumber.concatValues() Apr 10, 2025
@swc
Copy link
Author

swc commented Apr 21, 2025

Hi! Just wanted to follow up on this fix — it resolves a number of issues with a single line. I've worked around this with a patch in my angular app for now, but my team would rather wait for a proper fix. Let me know if anything else is needed.

cc @mertsincan @cetincakiroglu

@cetincakiroglu cetincakiroglu merged commit c2e7fc9 into primefaces:master Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment