I like to have an input with maximum 3 characters. In Firefox everything works fine I can only write 3 numbers inside the input - but in safari you can write a lot of number
You may try to user type="text" and oninput as below. This will let the numbers only.