Dealing with website forms that disable pasting

Occasionally I run across a website that thinks its a good idea to arbitrarily restrict fundamental functions of my browser. Recently I signed a petition which asked for my email address twice. Obviously I'm not going to type it twice, I'm going to type it once, copy it, then paste it into the second box. Except nothing happens. Have I hit the wrong key? Try again. Nope still doesn't work. Frustration mounts.

I took a look at the code to see how they did it by right-clicking in the offending text box and selecting "inspect element". some bright spark used on_paste="return false"
It's easy to see that they have implemented this anti-feature with the piece of code that says:
onpaste="return false"

One of the great features about the Chrome/Chromium browser is that you can directly edit the page via Inspect Element and instantly see the results. So after double-clicking on the onpaste element, and deleting it - I was able to paste my email address into the form!

This entry was posted in Uncategorized. Bookmark the permalink.

3 Responses to Dealing with website forms that disable pasting

  1. Anton says:

    Thanks!

    The last time I visited one of these extreme secure places I also discovered that drag-and-drop worked.

Leave a Reply

Your email address will not be published. Required fields are marked *