Maskedinput inserts a space before the entered numbers — wtf?

Hi!
One of the sites found the problem. Plugin jquery.maskedinput in one of the fields began to insert a space before the entered numbers.
For example: I enter 12345, and instead +7 (123) 45_-__-__ enter +7 (_1_) 2_3-_4-_5. The blanks are removed in succession by Backspace, that is the expected result, I get 5 times by pressing the backspace. Other forms on the website to which you apply this mask to work correctly. In the console, no errors there.

What it could be, how it can be overcome, gentlemen? Almighty Google didn't help.

html:
<input type="tel" name="phone" id="contacts-phone" required>


js:
$('#contacts-phone').mask('+7 (999) 999-99-99');

It would seem, what could go wrong, but...

Plugin updated to 1.4.1, did not help
March 19th 20 at 08:47
2 answers
March 19th 20 at 08:49
Solution
To use this library. Works perfectly. https://github.com/RobinHerbots/Inputmask/blob/4.x...
March 19th 20 at 08:51
1. try input type="tel" switch to "text" - tel generates events html5 which your input probably will not like
2. go to the console through a Mozilla look for more js events on this element
3. get input from the layout insert after body check
4. go into the source code of inputmask and look for what could go wrong

Find more questions by tags jQueryJavaScript