diff --git a/ui (gen4)/lib/keyboard.js b/ui (gen4)/lib/keyboard.js index 07b25c93..dc1e38e3 100755 --- a/ui (gen4)/lib/keyboard.js +++ b/ui (gen4)/lib/keyboard.js @@ -1088,9 +1088,16 @@ var KeyboardWithCSSModesPrototype = { context = context || this.context return !pattern || pattern == '*' - // XXX can we join these into one search??? - || context.is(pattern) - || context.find(pattern).length > 0 + // jQuery... + || context.is ? + (context.is(pattern) + || context.find(pattern).length > 0) + : false + // Vanilla JS... + || context.matches ? + (context.matches(pattern) + || !!context.querySelector(pattern)) + : false }, __init__: function(keyboard, context){