RobinHerbots / Inputmask

Input Mask plugin
https://robinherbots.github.io/Inputmask/
MIT License
6.39k stars 2.17k forks source link

SurveyJS currency mask change to $0,00 on blur when double click on input #2737

Open dragosciopeica opened 1 year ago

dragosciopeica commented 1 year ago

I am working on an Angular application with SurveyJS. And I had a task to add mask to the inputs. I choose to add currency mask. My problem is very strange and I couldn't replicate it on the SurveyJS website .

If I double click on the input and start typing the new amount and click outside of it, the mask is changed to $0,00 but under the hood, the value is the one that I typed ( so only the mask is showing something wrong ) Let's say I save the survey and hit refresh, after loading I will see the value that I typed.

And why I say is strange is because if I am not double-clicking, only one click and type, the value is preserved.

This is how I configure the input in JSON. { name: 'currency', type: 'text', title: 'Currency:', inputMask: 'currency', prefix: '$', }