title: masked input working ok on desktop and working ok for some masks on mobile
body: <p>I am using a masked plugin for two fields. One is for a Canadian Postal Code (T5T 5T5)and the other is for a phone number (999-999-9989). Both masks work ok on desktop. The problem is seen if you open the same code on a mobile phone. As the user types in the Postal Code one, the cursor keeps jumping to the beginning of the cursor.</p>
  
  <p>Here is the code:</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;input type="text" id="someID" /&gt; (T9T 1A1)
  &lt;br /&gt;
  &lt;span id="result"&gt;&lt;/span&gt;
  &lt;br /&gt;&lt;br /&gt;
  &lt;input type="text" id="someOtherID" /&gt; (999-999-9999)
  &lt;br /&gt;
  &lt;span id="result1"&gt;&lt;/span&gt;
  </code></pre>
  
  <p>Javascript:</p>
  
  <pre><code>$("#someID").mask("a9a 9a9");
  $("#someID").on('keyup', function() {
    var actualValue = $(this).val().replace(/[_-\s]/g, '').length;
    if (actualValue === 0 || actualValue !== 6) {
      $("#result").text("not valid")
    } else {
      $("#result").text("valid")
    }
  });
  
  $("#someOtherID").mask("999-999-9999");
  $("#someOtherID").on('keyup', function() {
    var actualValue = $(this).val().replace(/[_-\s]/g, '').length;
    if (actualValue === 0 || actualValue !== 10) {
      $("#result1").text("not valid")
    } else {
      $("#result1").text("valid")
    }
  });
  </code></pre>
  
  <p>I have attached the Mask plugin on this <a href="https://jsfiddle.net/e8zqdk0e/7/">fiddle</a>.</p>
  
  <p>Anyone ever seen this?</p>