title: Cannot read property 'substr' of undefined
body: <p>Trying to use On screen keyboard but I am receiving an error in this code:</p>
  
  <pre><code>if ($key.hasClass('osk-backspace')) {
      inputValue = $input.val();
      $input.val(inputValue.substr(0, inputValue.length - 1));
      $input.trigger('keyup');
      return false;
  }
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>Cannot read property 'substr' of undefined</p>
  </blockquote>