Skip to content

Virtual keyboard does not take input maxlen attribute into account #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
omogenot opened this issue Mar 23, 2021 · 1 comment
Closed
Assignees
Labels
enhancement New feature or request fixed Has been fixed.

Comments

@omogenot
Copy link

omogenot commented Mar 23, 2021

Hi,

I noticed that the original code does not check the field length against the maxlength attribute that might be associated to the input field.
In order to do that, the javascript inputFocusListener function must be modified to include a new variable:

          var theInputMaxLenAttr = theInput.getAttribute('maxlength');

and to use this value later on in the keysClickListeners function:

                  // add value by index
                  if ((theInputMaxLenAttr === null) || (theInputValArray.length < theInputMaxLenAttr)) {
                      theInputValArray.splice(theInputSelIndex, 0, keyValue);
                  }
@omogenot omogenot changed the title Virtual keyboard does not take input malden attribute into account Virtual keyboard does not take input maxlen attribute into account Mar 23, 2021
@furcan furcan self-assigned this Apr 13, 2021
@furcan furcan added the enhancement New feature or request label Apr 13, 2021
furcan added a commit that referenced this issue Apr 21, 2021
Fixed: The dispatcher issue on the input change event has been fixed: ([#11](#11))

Fixed: The current text selection issue has been fixed: ([#19](#19))

Added: The `max` and `maxlength` attribute controls have been added: ([#17](#17))

Added: The `options` parameter has been added to the `Run()` function to set the initialize options. => `KioskBoard.Run(selector, options);`

Changed: The `selector` parameter has been changed to `selectorOrElement` that also can use an element instead of the query selector. => `KioskBoard.Run(selectorOrElement);`

Changed: The `Merge()` function has been deprecated.

Changed: Code Review.
@furcan
Copy link
Owner

furcan commented Apr 21, 2021

Hi @omogenot

Max and MaxLength attribute controls have been added.

Thanks,
Furkan.

@furcan furcan closed this as completed Apr 21, 2021
@furcan furcan added the fixed Has been fixed. label Apr 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fixed Has been fixed.
Projects
None yet
Development

No branches or pull requests

2 participants