Skip to content

Commit

Permalink
re-added auto next text box
Browse files Browse the repository at this point in the history
  • Loading branch information
fkranenburg committed Sep 12, 2016
1 parent 2aa9e97 commit 58cf4f1
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion js/bootstrap-pincode-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,20 @@

input.on('keyup', $.proxy(function(e){
// after every keystroke we check if all inputs have a value, if yes we call complete callback

if(!this._isTouchDevice()){
// on backspace or delete go to previous input box
if(e.keyCode == 8 || e.keyCode == 46){
// goto previous
$(e.currentTarget).prev().select();
$(e.currentTarget).prev().focus();
}else{
if($(e.currentTarget).val()!=""){
$(e.currentTarget).next().select();
$(e.currentTarget).next().focus();
}
}
}

// update original input box
this.updateOriginalInput();

Expand Down

0 comments on commit 58cf4f1

Please sign in to comment.