-
Notifications
You must be signed in to change notification settings - Fork 723
Closed
Labels
Description
JSFiddle: https://jsfiddle.net/6gd3y71u/24/
I have two inputs: one with the virtual keyboard, another one with autofocus.
When keyboard initializes, it steals focus from the second input.
Currently I'm using following monkey-patch to workaround this issue:
require('virtual-keyboard/dist/js/jquery.keyboard.js');
const original_checkCaretSupport = $.keyboard.checkCaretSupport;
$.keyboard.checkCaretSupport = function() {
const focused = document.activeElement;
original_checkCaretSupport();
if (focused && document.activeElement !== focused && focused.focus) {
focused.focus();
}
};Reactions are currently unavailable