diff --git a/components/lib/inputnumber/InputNumber.vue b/components/lib/inputnumber/InputNumber.vue index 21a1db15e..4f4861e7d 100755 --- a/components/lib/inputnumber/InputNumber.vue +++ b/components/lib/inputnumber/InputNumber.vue @@ -870,7 +870,8 @@ export default { this.$refs.input.$el.setSelectionRange(selectionEnd, selectionEnd); } else if (newLength === currentLength) { if (operation === 'insert' || operation === 'delete-back-single') { - const newSelectionEnd = selectionEnd + Number(this.isDecimalSign(value) || this.isDecimalSign(insertedValueStr)); + const re = /[.,]/g; + const newSelectionEnd = selectionEnd + Number(re.test(value) || re.test(insertedValueStr)); this.$refs.input.$el.setSelectionRange(newSelectionEnd, newSelectionEnd); } else if (operation === 'delete-single') {