Ask questionsTrying to edit a value sets the caret to the end of the input

It seems the vue package has an issue that the vanilla js package does not: whenever a field's value is updated, the caret is automatically moved to the end of the input.

This makes it cumbersome to make changes like changing $52,000 to $52,500.


Answer questions AlexandreBonneau

Indeed, that behavior can be reproduced with the dollar settings (see the demo), but not with other settings like default, 'euro', 'integer', etc.

After a few tests, I could find that it's related to the currency symbol. When using:

<div class="labelClasses">With the <code>'testing'</code> option</div>
		<vue-autonumeric :options="['euro', {
							  digitGroupSeparator: '.',
							  decimalCharacter: ',',
							  decimalCharacterAlternative: '.',
							  currencySymbol: '$',
							  currencySymbolPlacement: 'p',
							  }]" v-model="autoNumericModel"></vue-autonumeric>

The bug occurs, but if you use currencySymbol: '€' then it does not.


Related questions

No questions were found.
Github User Rank List