-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
should dispatch changeEvent after value is updated #11
Comments
Hi @hwqing Thank you for using Kioskboard.js. I did not get the issue or your expectation clearly. But you can find an example video below to see everything works as normal. Otherwise, please explain your issue in more detail and with examples. Thank you. Furkan. Screen.Recording.2021-02-10.at.19.42.46.mp4 |
Hey @furcan, I just wanted to start off by saying fantastic job on Kioskboard. When you're listening to the change event in JS, for example:
This will print the value of the statement before it is updated by Kioskboard. My solution to this was moving the event dispatch calls after setting the input values. #18 Kind Regards! |
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.
Hi @gabe-lucas , @hwqing The issue has been fixed (v1.4.0) Thanks, |
Dear,
There is an issue that in change event for INPUT, you always get the old value.
For example, if currently the value for INPUT is "abc", and then click the VK key "d", you got "abcd" in INPUT, and in the meantime, change event triggered for INPUT and in this event, if you try to get the value of INPUT, you still got "abc".
By going through your code, I found that "input.dispatchEvent(changeEvent);" was executed before "input.value = theInputValArray.join('');" which might cause this problem.
Please consider to make relevant modification.
Thank you very much.
The text was updated successfully, but these errors were encountered: