mirror of
https://github.com/hodgef/simple-keyboard.git
synced 2025-03-04 00:12:58 +08:00
Merge pull request #285 from vickylance/master
Changed the condition to >= to check for character string inputs like ".com"
This commit is contained in:
commit
7206558540
@ -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 (
|
||||
/**
|
||||
|
@ -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', () => {
|
||||
|
Loading…
Reference in New Issue
Block a user