Skip to content

Pasting value may drop information without user noticing #72

Description

@juuso-vaadin

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions