From f9e1305e3b452c05ab38a5c526ea96ba1c02b5a7 Mon Sep 17 00:00:00 2001 From: Sudhanshu Yadav Date: Tue, 30 Mar 2021 22:28:14 +0530 Subject: [PATCH] added lib file --- lib/number_format.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/number_format.js b/lib/number_format.js index 98657e5f..784743c9 100644 --- a/lib/number_format.js +++ b/lib/number_format.js @@ -708,7 +708,7 @@ function (_React$Component) { var leftBound = !!format ? 0 : prefix.length; var rightBound = lastValue.length - (!!format ? 0 : suffix.length); - if (value.length > lastValue.length || !value.length || start === end || selectionStart === 0 && selectionEnd === lastValue.length || selectionStart === leftBound && selectionEnd === rightBound) { + if (value.length > lastValue.length || !value.length || start === end || selectionStart === 0 && selectionEnd === lastValue.length || start === 0 && end === lastValue.length || selectionStart === leftBound && selectionEnd === rightBound) { return value; } //if format got deleted reset the value to last value