Skip to content

Commit

Permalink
refactor(input-mask): fix issue when erase data of input
Browse files Browse the repository at this point in the history
  • Loading branch information
abalad committed Oct 26, 2020
1 parent e4861c6 commit 6bc873f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions projects/truly-ui/src/components/input/core/input-mask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,11 @@ export class InputMask {
}

private replaceUnderscoreForChar( valueArray, charInputted, cursorEnd ) {

if (valueArray.length === 0) {
valueArray = [...this.maskGuideExpression];
}

if ( this.maskSpecialCharacters.indexOf( this.maskExpression[ cursorEnd ] ) >= 0 ) {
cursorEnd++;
}
Expand Down

0 comments on commit 6bc873f

Please sign in to comment.