From 86caf021fa2c926572cdbc6da72c348206852a37 Mon Sep 17 00:00:00 2001 From: Vignesh S Date: Tue, 29 Oct 2019 20:03:08 +0530 Subject: [PATCH 1/3] Update Utilities.js --- src/lib/services/Utilities.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/services/Utilities.js b/src/lib/services/Utilities.js index 7c3c3e3e..2ba210dc 100644 --- a/src/lib/services/Utilities.js +++ b/src/lib/services/Utilities.js @@ -304,7 +304,7 @@ class Utilities { let options = this.getOptions(); let maxLength = options.maxLength; let currentInput = inputObj[options.inputName]; - let condition = currentInput.length === maxLength; + let condition = currentInput.length >= maxLength; if ( /** From 6cf99720c4500b7ef61f86e56c2e08a80324adb2 Mon Sep 17 00:00:00 2001 From: Francisco Hodge Date: Tue, 29 Oct 2019 10:57:45 -0400 Subject: [PATCH 2/3] Update Utilities.test.js --- src/lib/services/tests/Utilities.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/services/tests/Utilities.test.js b/src/lib/services/tests/Utilities.test.js index 01252561..35a1e43c 100644 --- a/src/lib/services/tests/Utilities.test.js +++ b/src/lib/services/tests/Utilities.test.js @@ -379,7 +379,7 @@ it('Keyboard handleMaxLength will work with numeric maxLength', () => { let output = keyboard.utilities.handleMaxLength(keyboard.input, "testq"); - expect(output).toBeFalsy(); + expect(output).toBe(true); }); it('Keyboard handleMaxLength wont work with non numeric or object maxLength', () => { @@ -490,4 +490,4 @@ it('Keyboard camelCase will work with empty strings', () => { testUtil.setDOM(); let keyboard = new Keyboard(); expect(keyboard.utilities.camelCase()).toBeFalsy(); -}); \ No newline at end of file +}); From d1cdbd2d112dccdf7db356aada3b733d40a3db7d Mon Sep 17 00:00:00 2001 From: Francisco Hodge Date: Tue, 29 Oct 2019 10:58:24 -0400 Subject: [PATCH 3/3] Update Utilities.js --- src/lib/services/Utilities.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/services/Utilities.js b/src/lib/services/Utilities.js index 2ba210dc..1cf1b738 100644 --- a/src/lib/services/Utilities.js +++ b/src/lib/services/Utilities.js @@ -304,7 +304,7 @@ class Utilities { let options = this.getOptions(); let maxLength = options.maxLength; let currentInput = inputObj[options.inputName]; - let condition = currentInput.length >= maxLength; + let condition = updatedInput.length - 1 >= maxLength; if ( /**