Search code examples
androidjquerymaskedinput

Galaxy S7 types text in reverse order


I have a jquery masked input plugin. One of its instances set to credit card input field. But there is some bug on Galaxy S7 mobile: digit appears after cursor and cursor stays on its initial place. Any ideas how to fix?

<input type="text" id="pan" name="pan">
$('input[id="pan"]').mask("9999 9999 9999 9999");

Solution

  • If your website includes both LTR and RTL you might wanna force that input to LTR with both direction and bidi-override:

    <input type="text" id="pan" name="pan" style="direction: ltr; unicode-bidi: bidi-override;">