I don't often see websites blocking paste on OTP code fields. What I do see often is websites breaking up the OTP field into n separate input fields, and having some code that auto-switches between the input fields as you type them. However, the auto-switching code doesn't handle pastes, so if you try to paste the entire code only the first digit gets entered. ‘Don’t f* with paste’ doesn't help with that.
These are also terrible if you need to go back because you mistyped. Shift+Tab brings your cursor back to correct it but their code pushes the cursor right back into the next empty box. (And they do this with a lot more than just OTP.)
I’ve to do this with OTP codes at work as well. Reimplementing paste here I’d say is pretty trivial (though you have to add Yet Another Event Listener) but I’d agree with the general sentiment here to just not overcomplicate it at all if possible
Ugh yeah, honestly if paste is disabled because that was the most effort they were going to put in to 'fixing' that I'll excuse it. Better to not even appear briefly like it might work!
I recently learned we can drag password from any text or Bitwarden to the password fields without triggering paste event.
some shit tier sites coded by obstinate assholes do not let you proceed to submit the form without seeing keyboard events
1Password just added Auto type in the Lab section of the app for desktop apps and… that. It types username/email, hits enter, password, enter.
For Safari on iOS and macOS (and some other browsers on the Mac), there's the excellent (and similarly well named) StopTheMadness extension.