Copy Paste Issue

Feb 13 2019 2:38 PM

My textBox some times does not allow me to paste, it works for 5 or 6th attempt, sometimes in the very first attempt. I happens to me both in Crome and IE, below is the code

function AlphaNumericPaste() {
var objTxtBox = window.event.srcElement;
var num_regex = /^[\w]+$/;
var PasteData = TrimclipboardData();
if (!num_regex.test(PasteData)) {
CancelEvent();
}
}


Answers (4)