-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to edit a value sets the caret to the end of the input #48
Comments
This is unfortunately a deal breaker, unless there is something I have missed in the documentation. |
Indeed, that behavior can be reproduced with the dollar settings (see the demo), but not with other settings like default, 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 |
@AlexandreBonneau thank you for your quick response. Unfortunately the issue is still intermittent even in the scenarios you describe as working correctly. It seems to work often on integer, but if I do something like |
Well, as it seems, it's related to the use of |
This is related to autoNumeric/autoNumeric#684. |
Thanks for the link, I didn't notice that one when I searched the issues. Up until now I've been using v-money which seems to handle this by calculating the caret position https://github.com/vuejs-tips/v-money/blob/master/src/directive.js |
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.
The text was updated successfully, but these errors were encountered: