Hacker News new | ask | show | jobs
by tom-lord 4088 days ago
I don't know much javascript, but that looks extremely error prone to me. How would it behave in different monitor sizes? With zoomed in/out screens? On mobiles, tablets, etc?

And it would still be pretty easy for a cheating script to work cheat your validation!

1 comments

It's just an example, but zoom should scale both the element coordinates and the mouse coordinates. This sort of validation can be made a lot more elaborate.