mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 17:02:38 +00:00
perf(input-number): when zero is entered, value displayed isn't expected
This commit is contained in:
parent
60b3806dab
commit
44dd8cd329
1 changed files with 2 additions and 1 deletions
|
@ -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') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue