From 7c38dd037904efe044bbcb4678f80910576d667e Mon Sep 17 00:00:00 2001 From: Vladimir Date: Tue, 25 Aug 2020 16:12:55 +0500 Subject: [PATCH] fixed review --- .../main/java/ru/touchin/widget/AmountWithDecimalDecorator.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/views/src/main/java/ru/touchin/widget/AmountWithDecimalDecorator.kt b/views/src/main/java/ru/touchin/widget/AmountWithDecimalDecorator.kt index c6aeb86..a9c806a 100644 --- a/views/src/main/java/ru/touchin/widget/AmountWithDecimalDecorator.kt +++ b/views/src/main/java/ru/touchin/widget/AmountWithDecimalDecorator.kt @@ -77,7 +77,8 @@ class AmountWithDecimalDecorator( onTextInserted(textAfter, cursorPos) } } catch (e: Throwable) { - editText.setText("") + editText.setText(textBefore) + editText.setSelection(textBefore.length) } } else { textBefore = text.toString()