How is the "tel" type a solution? According to the standard (https://html.spec.whatwg.org/multipage/input.html#telephone-...), it accepts every character except line feeds and carriage returns.
Without any pattern specified, the code you posted will accept emojis as input, it's not a good choice for a numeric only field. It's also intended for phone numbers...