Skip to content

Commit

Permalink
move to top
Browse files Browse the repository at this point in the history
  • Loading branch information
narefyev91 committed Mar 23, 2023
1 parent 232dde5 commit f830783
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/iou/steps/IOUAmountPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ class IOUAmountPage extends React.Component {
* @param {String} key
*/
updateAmountNumberPad(key) {
this.focusTextInput();

// Backspace button is pressed
if (key === '<' || key === 'Backspace') {
if (this.state.amount.length > 0) {
Expand All @@ -191,7 +193,6 @@ class IOUAmountPage extends React.Component {
return;
}

this.focusTextInput();
this.setState((prevState) => {
const amount = this.addLeadingZero(`${prevState.amount.substring(0, prevState.selection.start)}${key}${prevState.amount.substring(prevState.selection.end)}`);
return this.getNewState(prevState, amount);
Expand Down

0 comments on commit f830783

Please sign in to comment.