Android version of Chrome browser cannot be implemented through preventDefault to prohibit the entry of specific characters in < input >?

imagine that < input > listens to the keydown event, determines the keyCode of the event parameter object, and then calls preventDefault () to block the input of illegal characters.

sample code:

   

the version of the mobile operating system is Android 7.1.1.

Why is the output in the Chrome browser inconsistent with Firefox, and why can"t input be blocked through preventDefault () ?

Dec.10,2021
Menu