Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Ask HN: Why can't I copy and paste into HTML fields?
1 point by danmccorm on Feb 29, 2016 | hide | past | favorite | 1 comment
I've noticed a trend to prevent copying and pasting into HTML fields which I find quite irrational. Doesn't accuracy increase if I'm allowed to copy and paste something? Presently, I'm prevented from copying a checking account number into a field, so I have to type it out by hand, which is much more error-prone. Does anyone know why sites do this?


1 reason I can think of is when copying and pasting - the text formatting used from where you copied the string from can come over with the text. So your not pasting in just a number but potentially html / css with it.

For obvious reasons, this could be a problem and instead of stripping the html / css / garbage - it's easier to just prevent the action entirely.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: