-
Notifications
You must be signed in to change notification settings - Fork 723
Rob Garrison edited this page Mar 8, 2019
·
15 revisions
Change Size | Hide Native Keyboard | Slow on Mobile | Use in Bootstrap Modal | Contributing
.ui-keyboard span { font-size: 1.1em; }
.ui-keyboard-button { height: 2em; width: 2em; margin: .1em; cursor: pointer; }
- The default font-size of 1.1em (110% of the set font size on the page) will also adjust the overall size of the keyboard. If the font size isn't the problem, then you can adjust the button size in the second line of css to change that size.
Try:
- Set the lockInput keyboard option to
true
(ref). This prevents input from sources outside of the virtual keyboard. Clicking to set the caret still works, but the actual caret is not visible. Consider including the caret extension. - Add a
readonly
property to the input. This is essentially what thelockInput
option does but more directly. Again, the caret won't be visible, so consider including the caret extension. - Using
blur
on the input doesn't work because this plugin reapplies the focus on the input after interacting with the virtual keyboard (demo).
- The keyBinding option is set to
'mousedown touchstart'
by default. It seems that including the 'mousedown' event causes some lagging issues. - Optimally, I would actually recommend using jQuery's Pointer Events Polyfill (PEP), then all that needs to be added to the keyBinding option is
'pointerdown'
. And it is then usable by both desktop & mobile browsers.
-
Bootstrap continuously shifts focus to elements inside the modal window. Meaning, if you add a keyboard to a Bootstrap modal element, you can't focus on the preview input (see issue #599).
-
To fix this problem, append the keyboard to the modal inside of the
beforeVisible
callback (demo):$(function() { $('.keyboard').keyboard({ layout: "qwerty", // string or array beforeVisible: function(e, keyboard, el) { var inModal = $(el).parents('.modal').length > 0; if (inModal) { keyboard.$keyboard.appendTo($(el).parents('.modal-body')); } } }); });
A: I'm glad you asked! Details can be found on the Contributing page.
Home | FAQ | Setup | Usage | Options | Methods | Contenteditable | Theme | Log
Options: Layout | Language | Usability | Actions
Extensions: AltKeysPopup | Autocomplete | Caret | Extender | Mobile | Navigation | PreviewKeySet | Scramble | Typing