|
Hi All, first time poster. Thanks in advance for any help.
I've coded a function that runs on click on a text field which is meant for an IP address. The function makes sure that user enters only digits and dots or backspaces, and no more than two dots in a row or more than 3 digits in a row, etc.
There are two problem with this function: 1. It's impossible to use ctrl+v to paste in the field (it is possible to paste with right click and paste or via the edit->paste command) 2. if I select the entire text, it's impossible to write over it without deleting it first.
So, how can enable ctrl+v, and how can allow writing over the text?
|