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

Pasting value may drop information without user noticing #72

Open
juuso-vaadin opened this issue Jun 24, 2024 · 0 comments
Open

Pasting value may drop information without user noticing #72

juuso-vaadin opened this issue Jun 24, 2024 · 0 comments

Comments

@juuso-vaadin
Copy link

Example 1

Field with formatting NumeralFieldFormatter(",", ".", 2) will format

  • 1200.049 → 1,200.04 (rounding issue)
  • 1.200,00 → 1.20 (wrong symbols in input)

Example 2

Field with formatting CustomStringBlockFormatter.Builder().blocks(3, 3, 3).delimiters("-") will format

  • 123 456 789 → 123- 45-6 7 (spaces taken as characters)

Example 3

Field with formatting IBANFormatter.fromIBANLength(18) will format

  • GB29 NWBK 6016 1331 9268 19 → GB29 NWBK 6016 1331 92 (dropping last numbers due to limited length)

Improvement idea

As generic solution, component should recognize if inputted characters are cut out. This is mainly an issue when pasting in values.
Component could also indicate if user is trying to type in a field that has already reached the max number of characters.

@juuso-vaadin juuso-vaadin changed the title Pasting formatted values may drop information without user noticing Pasting value may drop information without user noticing Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant