-
Notifications
You must be signed in to change notification settings - Fork 722
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
Keyboard loads after a delay #649
Comments
Hi @mdevraj! You can prebuild the keyboard while the page is idle, and before the keyboard opens, by calling the $("#keyboard").getkeyboard().startup(); Eventually, I'll completely remove binding to all keys and use a delegated binding to the keyboard wrapper. I'm not sure why I added a binding to each key in the first place. |
Hi @Mottie, Thank you for getting back. I did further analysis and see that the startup() gets called every time the input field is in focus. And this is because the reveal() does not have any entry in the base.$keyboard and hence the condition fails and the startup() gets called. The keyboard is in the Any further pointers that you can help me with? Thanks. |
Once You can look at |
Hi @Mottie, I infact checked a jsfiddle demo of yours and debugged that. It seems to be calling startup() everytime the keyboard gets visible. Any further pointers that you can help me with? Thanks. |
The |
You are right. The keyboard is already built and it should not take time to load. But like my first comment, the bindKeys() gets called everytime the startup() is called. Binding 240+ keys takes close to 500ms. I am not sure why the bindKeys() is called everytime. In the meantime, I will try creating a jsFiddle and demonstrate the delay. |
I'll work on changing the |
Thanks @Mottie I have created a jsFiddle: http://jsfiddle.net/mdevraj/uhqodz25/ What I am noticing is that with chrome developer tools active, the performance is slow as compared to the normal mode. |
Please try the newly released v1.28.0. It now uses delegated event binding, so hopefully you'll see some performance improvements. |
Where did u find the angular 2 directive? is it public? |
Hi
I have a keyboard with 2 layouts -
1 layout with many keysets. So there are more than 240 keys in that layout.
1 layout with just numbers. So there are about 13 keys.
I have some overridden styles for some keys too.
The challenge is that when the keyboard loads, it takes more than 1 second to show the keyboard.
After digging into the code, I see that the bindKeys() method takes the major chunk of the time and I see that you call this function when the keyboard is about to be visible.
Am I missing some configuration which will ensure that I can load the keyboard faster?
Note: The demo app does not have an issue when I load a large number of keysets. Difference is that I am using the angular 2 directive and not the jquery plugin directly.
Please help!
The text was updated successfully, but these errors were encountered: