Skip to content

Commit b82f6c7

Browse files
authored
Merge pull request #50 from yatsinar/master
Deletion detection adjusted in MaskedTextChangedListener
2 parents 26ffcf8 + 7a2f012 commit b82f6c7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

inputmask/src/main/kotlin/com/redmadrobot/inputmask/MaskedTextChangedListener.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ open class MaskedTextChangedListener(
120120
}
121121

122122
override fun onTextChanged(text: CharSequence, cursorPosition: Int, before: Int, count: Int) {
123-
val isDeletion: Boolean = before > 0
123+
val isDeletion: Boolean = before > 0 && count == 0
124124
val result: Mask.Result =
125125
this.mask.apply(
126126
CaretString(

0 commit comments

Comments
 (0)