diff --git a/js/jquery.keyboard.js b/js/jquery.keyboard.js index 62ebc34b..ebc2fbd1 100644 --- a/js/jquery.keyboard.js +++ b/js/jquery.keyboard.js @@ -3088,7 +3088,7 @@ http://www.opensource.org/licenses/mit-license.php }; $keyboard.caret = function($el, param1, param2) { - if (!$el.length || $el.is(':hidden') || $el.css('visibility') === 'hidden') { + if (!$el || !$el.length || $el.is(':hidden') || $el.css('visibility') === 'hidden') { return {}; } var start, end, txt, pos,