-
Notifications
You must be signed in to change notification settings - Fork 118
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
Not Selecting On Tab to Numeric Field #54
Labels
Comments
I'd like to propose the following patch: add this.$nextTick(function () {
this.$el.select()
}) here /**
* Handle focus event.
* @param {Object} e
*/
onFocusHandler (e) {
this.$emit('focus', e)
if (this.valueNumber === 0) {
this.amount = null
} else {
this.amount = accounting.formatMoney(this.valueNumber, {
symbol: '',
format: '%v',
thousand: '',
decimal: this.decimalSeparatorSymbol,
precision: Number(this.precision)
})
this.$nextTick(function () {
this.$el.select()
})
}
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Normally, when you use tab to go to the next field, it will select all the text inside the field. But if the numeric field needs to unformat the value, it would not select the text.
Expected Behavior
As seen in the screenshot, it will select all the text inside the field.
Actual Behavior
Since it needs to unformat the number, it didn't select the text inside and the cursor is at the rightmost.
Specifications
The text was updated successfully, but these errors were encountered: