parttio / textfieldformatter

TextField Formatter Vaadin add-on
Apache License 2.0
13 stars 9 forks source link

Caret jumps after thousand separator is added by numeral formatter #26

Closed johannesh2 closed 2 years ago

johannesh2 commented 4 years ago

Hi, when using a NumeralFieldFormatter for a TextField with decimal separator ',' and thousands separator '.', I see the following behavior with Vaadin 14.1.19 and TextField Formatter 4.2.0:

  1. Enter "4,5" in the field. This is OK.
  2. Set the focus in front of the input and add some numbers, e.g. to enter "1234,5".
  3. Observation: in the moment when the Formatter adds the "." and shows "1.234,5" then the focus in the input field is set to the end.
vaadin-miki commented 4 years ago

this also happens when you remove some digits from the input, the caret sometimes jumps to the end position

CribberSix commented 4 years ago

The bug also appears when you insert a number in the middle of an existing number. Any update on a possible fix yet?

johannesh2 commented 4 years ago

Sorry I haven't had any time to take a look at what might cause the behavior.

szumsteg commented 3 years ago

Are there any news? I still have this problem. Whenever a separator would have to be moved (e.g. because a character was deleted or inserted) the cursor jumps to the very end. Which separator ("", ".", "," - "or whatever) does not matter.