Open ghost opened 4 years ago
Confirm the same issue! Looking forward for a solution.
Same here ! Looking for solution too I tried using stripLeadingZeroes:false prop but it costs problems like this:
Entering '1':
when empty input : 0.00 => 01.00 after backspace to 0.00: 0.00 => 10.00
version: 5.0.7-beta.29 browser : chrome/opera my settings:
alias:"decimal",
groupSeparator: '',
digits: 2,
digitsOptional: false,
SetMaxOnOverflow: true,
prefix: '',
placeholder:'0',
nullable: false,
positionCaretOnTab: true,
shortcuts: null,
enforceDigitsOnBlur: true,
rightAlign: false,
stripLeadingZeroes: false,
Describe the bug I'm using inputmask with following options and when i try to delete the first digit followed by zeros and type a new digit at the start, leading zeros until first separator followed by non zeros are cutted off and if only zeros, they are all cutted off. I tried several configurations without success. I understand that this is ambiguous but i would like to understand if there is a way to keep leading zeros. I tried to don't use decimal alias but without this, groups doesn't work
nullable: true, alias: 'decimal', groupSeparator: ',', autoGroup: true, digits: 2, digitsOptional: true, clearIncomplete: true, rightAlign: false
Add a link to a codepen, jsfiddle or other example page which shows the problem You can try directly on demo page https://robinherbots.github.io/Inputmask/ filling currency field with 100,100,000.00 and deleting the first "1".
OS: OSX
Browser: Chrome
Inputmask version: 5.0.3