Fixed #5170 - InputNumber can't enter 0.0x using minFractionDigits/mode="currency"

pull/5656/head
tugcekucukoglu 2024-04-25 09:54:35 +03:00
parent d39d1f851d
commit 1bdaf73576
1 changed files with 1 additions and 4 deletions

View File

@ -856,10 +856,7 @@ export default {
this.$refs.input.$el.setSelectionRange(selectionEnd, selectionEnd);
} else if (newLength === currentLength) {
if (operation === 'insert' || operation === 'delete-back-single') {
const re = /[.,]/g;
const newSelectionEnd = selectionEnd + Number(re.test(value) || re.test(insertedValueStr));
this.$refs.input.$el.setSelectionRange(newSelectionEnd, newSelectionEnd);
this.$refs.input.$el.setSelectionRange(selectionEnd + 1, selectionEnd + 1);
} else if (operation === 'delete-single') {
this.$refs.input.$el.setSelectionRange(selectionEnd - 1, selectionEnd - 1);
} else if (operation === 'delete-range' || operation === 'spin') {