Hi everyone,
I'm having a problem with the usage of currency and number masks on decimal / integer inputs. Sometimes when I digit the number it seems that the mask itself cuts part of my string.
I already debugged the app to see what happens and I could confirm that indeed the input's value is cropped (please note the steps flow attached to the current discussion).
The variable used to populate the field "Preço da Casa" is:
A last note:
Can someone help me solve this issue?
Best regards,
Hello,
Can you please share the input parameters you're passing to the "CurrencyMask" pattern, so I can try to reproduce your issue?
Hi Aurelio,
For sure.
The input parameters passed to the "CurrencyMask" are displayed in the attached picture.
Hope this helps you.
Unfortunately, I couldn't reproduce your issue. A few things you can check:
Regarding your questions:
Hi @Aurelio Junior
As promised I leave here a sample app where I could replicate the behavior I was telling you about.
Please pay attention to picture 2 (which was taken when I was debugging) and the subsequent result (picture 1).
Procedure steps
I hope this sample app and my inputs help solving the issue.
Hello @Aurelio Junior ,
Regarding this issue, and the example application shared by @Antonio Mendonça , do you have any update that you can share?
Thank you for your help.
CA
Hi @Alfaro and @Antonio Mendonça,
I've downloaded the test shared by Antonio last week. I've checked it and I just want to be clear that what I saw is also what you are reporting about.
When typing in a decimal field with the InputMask and you are typing fast, the cursor jumps to the end of the input and is no longer accepting inputs from the keyboard, because it's beyond the mask of the input.
When typing slowly in the same decimal field, the digit gets added and the cursor remains on the same position, as I would expect. This is what you want also when you're typing fast, correct?
I'll investigate why this happens and when I find the cause and fix it, I'll upload it to the Forge. When you still have another issue, please let me know a.s.a.p. so I can fix that too.
Kind regards,
Remco
Hello guys,
Sorry for the late reply, but I haven't had a lot of time to come to the forums these past few days.
I downloaded your sample app and, after spending quite some time trying, I finally found a combination of actions that allowed me to consistently reproduce the issue. I have no idea why it happens, but I tried updating the underlying JavaScript library used by the component to its latest version (available here), and that seemed to solve the problem.
Of course, if you decide to do that, you have to carefully test the component, to make sure that everything continues to work properly.
Hi @Aurelio Junior,
Since you've put so much time and effort into reproducing and fixing the issue, don't you want to become part of the component team?
You can upload your version (as stable when fully tested) or as a Development version. The other developers in the component team can support you.