-
Notifications
You must be signed in to change notification settings - Fork 724
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
Modularization of keyboard for different use cases #83
Comments
It would probably be better to not to apply a new instance of the plugin to each input. I've been thinking about rewriting the core plugin as you described so it will perform better when there are numerous elements; but it'll likely require a lot of changes that I don't have the time to do right now. I would be overjoyed to get some help with the project. What is it that you could help me with? :P |
I was thinking about adding a singleton option that takes a jQuery element or selector. If this singleton option is set the keyboard will only be created once and attached to the element specified by singleton. Example: Do you think this would be hard to implement with the existing code? Or do you have a better solution? Cheers |
Hello again I started to re factor the keyboard to allow the separation of the keyboard container and the input elements. See the following commit for what I did. base.$el is now the contatiner for the keyboard. base.$inputs are the input fields associated to the keyboard. base.$focus is the input field where new input is going to, it is the inputs field that had the focus last. I now plan to modify the keyboard to allow multiple inputs this currently doesn't work. What do you think? |
Hmmm, it still seems like it creates a new keyboard for each input... I get three I was thinking about moving a bunch of the functions out to But again, my time is short... I have too many things going on right now =( Thanks for your effort! P.S. Also, when I click inside of the Qwerty Password demo.. I get this error:
|
Thanks for your feedback. I fixed the errors withe null. It happened when the stayOpen was set to null. As for the multiple keyboards. It only creates a single keyboard if you explicitly specify the singleton parameter. E.g. It will then create a keyboard at the location I will try to add a demo when I have time. |
Hi @pascal-bach! In the latest update, I've made some changes that should enhance performance. Basically when the same layout is used on multiple keyboards, the layout is only built once. Multiple keyboards are no longer stored in memory nor are they kept in the DOM - the keyboard is essentially cloned from a "master" copy and destroy after each use. |
Hello Rob
We ran into some performance issues with your keyboard recently. The problem is the mismatch between the way the keyboard is constructed and our use case.
The idea behind the keyboard is that there is one keyboard per input box but in our use case we need one keyboard for many different input boxes. So the current solution doesn't scale well.
Our idea is to implement a simpler version of the keyboard that supports this use case better. Concretely this means a version of the keyboard that handles multiple input fields from one single instance.
Do you think it would be possible to modularize the functions in a way similar to what jquery does right now with version 1.8. This way the keyboard can be built in different variants for different use cases. But still share the code base. This allows to exclude functions that are not needed and improves performance.
What do you think about this idea? I would be happy to contribute to this enterprise if you think this is a good way to go.
Regards
Pascal
The text was updated successfully, but these errors were encountered: