I used the following code in jQuery to mask the telefone
field for example.
jQuery(document).ready(function () {
$("#telefone").mask("(99)9999.9999");
});
This code works perfectly on the computer, but on the phone, only the formatting appears waiting to be typed something, but when something is typed, the mask is not applied, thus blending the numbers with the other characters.
Example of what happens:
jQuery(function($){
$("#telefone").mask("(99) 9999-9999");
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script><scriptsrc="https://raw.githubusercontent.com/digitalBush/jquery.maskedinput/1.4.1/dist/jquery.maskedinput.min.js"></script>
<strong>No desktop: </strong>
<input type="text" id="telefone">
<br><br>
<strong>No celular: </strong>
<input type="text" value="(__)____.____">
Does anyone have any idea how to fix this?
Note: If you enter the correct number of phone numbers, even if you have other characters in the field, it applies the filter by pressing enter, or clicking outside the field.