Keyboard icon indicating copy to clipboard operation
Keyboard copied to clipboard

Will the keyboard play nicely with JQuery Mobile 1.4.5?

Open Michael-F-Ellis opened this issue 9 years ago • 8 comments

I need a nice virtual keyboard for running a web kiosk on a Raspberry Pi. The interfaces also need to work on smartphones, which of course have native vkbds. Thanks!

Michael-F-Ellis avatar Aug 28 '16 01:08 Michael-F-Ellis

Hi @Michael-F-Ellis!

There is a demo of this keyboard using jQuery Mobile v1.4.5. I haven't tried it on a Raspberry Pi, but I've heard of others that have done it.

Mottie avatar Aug 28 '16 03:08 Mottie

Nice! This may get me out of a corner I painted myself into. Thanks for creating and maintaining it.

Michael-F-Ellis avatar Aug 28 '16 13:08 Michael-F-Ellis

Hmm, that's odd... focusing on the input opens the keyboard, but only the first time. I'll take a look.

Mottie avatar Aug 28 '16 18:08 Mottie

Wow, predictive support! I was just about to ask for help with that? Could it be something to do with the destroy() call?

Michael-F-Ellis avatar Aug 28 '16 19:08 Michael-F-Ellis

The problem goes away if I comment out keyboard.removeKeyboard() in the :hidden() function. I tried looking at total document size using a sizeof() function I found at

http://code.stephenmorley.org/javascript/finding-the-memory-usage-of-objects/

No idea if the function is reliable, but it shows an increase of a few hundred bytes after each initial use of keyboard per input. Subsequent uses on the same element seem to leak about 10 bytes although that could be overhead from the DevTools console.

If that's as bad as it gets, my app could live with it. I'm monitoring total memory use of my processes behind the scenes and can restart them if they grow too large.

Is the keyboard part of the document? If not, then my measurements obviously don't mean much.

Michael-F-Ellis avatar Aug 28 '16 21:08 Michael-F-Ellis

The keyboard is attached to each input/textarea and cross-references through jQuery's data object, so I'm not sure about the accuracy of that report.

It shouldn't be a problem is the keyboard isn't removed since the reveal code does check if the keyboard already exists in the DOM. I haven't had a chance to mess with the code because of other stuff going on and I'm having graphics driver issues.

If you got it working, then great! I won't need to rush to figure out the problem.

Mottie avatar Aug 28 '16 22:08 Mottie

So far no reason to rush. I'm sure I'm going to have a few more questions about usage and layout. I do have it working in a prototype of my app using a copy of the script portion of your demo to define the widget. Would you prefer follow-on questions in separate issues, or should I continue to use this issue?

Michael-F-Ellis avatar Aug 29 '16 01:08 Michael-F-Ellis

I would prefer to Gitter. I may not answer right away, but it's easier to have a conversation and not add a lot of noise to this issue.

Mottie avatar Aug 29 '16 01:08 Mottie