You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow Developing section in readme and load localhost:3000 in browser
Type 12 in default finput field
Select all and copy
Position caret between 1 and 2
Paste
Observed (broken) behaviour: 12 is completely replaced with 12 making it look like no paste has happened.
Expected:
Value should now be 1,212
The fix needs to be tested on both mac & windows. We should probably test edge cases such as positioning the caret before and after thousands/decimal delimiters before pasting.
The text was updated successfully, but these errors were encountered:
@msuperina I guess cases would include (I'm making up my own notation here so let me know if it isn't clear):
pasting at the beginning of existing value: [paste 12]12 => 1,212
pasting in the middle of existing value where there are no delimiters: 1[paste 12]2 => 1,122
pasting in the middle of existing value before a thousands delimiter: 1[paste 12],212 => 112,212
pasting in the middle of existing value after a thousands delimiter: 1,[paste 12]212 => 112,212
pasting at the end of existing value: 12[paste 12] => 1,212
pasting in the middle of existing value before a decimal delimiter: 12[paste 12].00 => 1,212.00
pasting in the middle of existing value after a decimal delimiter: 12.[paste 12]00 => 12.12. There's additional behaviour to consider here - what if the value pasted after the decimal delimiter is more than the number of allowed decimal digits? Not sure what should happen here. One option is to truncate the pasted value (12.[paste 1234]00 => 12.12)
pasting in the middle of existing decimal value: 12.1[paste 12]2 => ?. Again not sure what the behaviour here should be. One option is to treat as though we'd expanded to over the allowed decimals and then truncated it to allowed decimal places (12.11)
And then permutations of those with different options settings. There's possibly more cases that I'm missing.
To reproduce issue:
localhost:3000
in browser12
in default finput field1
and2
Observed (broken) behaviour:
12
is completely replaced with12
making it look like no paste has happened.Expected:
Value should now be
1,212
The fix needs to be tested on both mac & windows. We should probably test edge cases such as positioning the caret before and after thousands/decimal delimiters before pasting.
The text was updated successfully, but these errors were encountered: