I am currently utilizing jQuery and my code resembles the following:
$('body').children("#desktop").on('keyup paste',".password",function(){
//Check characters to make sure more than 6
$('#desktop').find('.errormessage_password').remove('');
$('#desktop').find('.password_area').append('<div class="errormessage_password"></div>');
$('#desktop').find('.errormessage_password').html('<div class="bad">'+$(this).val()+'</div>');
});
At the moment, I display the password field value on the screen for demonstration purposes. It works fine with typed characters as I can see them immediately and count them later.
However, my issue arises when pasting (using control-v) rather than right-clicking to paste because in the latter case, it fails to capture data from the password field.
Is there a way to detect a paste event after it has occurred, not before?