Skip to content

Commit

Permalink
Fixed #1746 - Problem in entering negative value in INPUTNUMBER.
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Jan 27, 2021
1 parent dab5952 commit 9891f83
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/inputnumber/InputNumber.js
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,9 @@ export class InputNumber extends Component {
this._group.lastIndex = 0;
this.inputEl.setSelectionRange(selectionEnd, selectionEnd);
}
else if (inputValue === '-' && operation === 'insert') {
this.inputEl.setSelectionRange(selectionEnd + 1, selectionEnd + 1);
}
else {
selectionEnd = selectionEnd + (newLength - currentLength);
this.inputEl.setSelectionRange(selectionEnd, selectionEnd);
Expand Down

0 comments on commit 9891f83

Please sign in to comment.