With webapps users may type or may paste. If you need special behaviour (e.g. spell-checking, form auto-completion etc) on text input you need to catch the paste event. I have used a couple of login forms that don't detect that I paste passwords from my password store, and so don't let me submit.

This is a code demo, as browsers have wide support for detecting paste, say the docs 1 2 3 (I'm not listing w3cschools, although its mentioned on there). There is no support in or Nodejs, as it doesn't make sense. Secondly one would want to detect what text had been pasted, 4 lists quite a few solutions. In slightly different context, one needs what text is selected 5. A convenient and reliable example of these features is googledocs 6, described in wiki. This wiki page lists all the supported browsers, and as far as I am aware this successfully demonstrates that the paste features is reliable in all browsers (although look at quirksmode).

The following demo form will auto-submit anything you type into google, and will still work usefully if you paste



jQuery-paste

RSS. Share: Share this resource on your twitter account. Share this resource on your linked-in account. G+

jQuery-paste

RSS. Share: Share this resource on your linked-in account. Share this resource on your twitter account. G+ ­ Follow edited