Fix: Pasting via middle click did not run password validation during registration.

This commit is contained in:
baldo 2016-04-26 17:01:54 +02:00 committed by root
parent 77e8f563d1
commit 4ae1cb69d0

View File

@ -627,8 +627,9 @@ if(!window.registrationsClosed) {
});
// validate on keyup
$('#popup-register input').on('keyup',function(){
// validate on keyup / paste
$('#popup-register input').on('keyup paste',function(){
setTimeout(function () { // defer validation as after paste the content is not immediately available
if(validateRegisterForm($('#popup-register'))
&& !$('#signup-user-nickname-step2').hasClass('nickname-taken')
&& !$('#signup-user-email-step2').hasClass('email-in-use')) {
@ -637,6 +638,7 @@ if(!window.registrationsClosed) {
else {
$('#signup-btn-step2').addClass('disabled');
}
}, 0);
});
$('#popup-register input').trigger('keyup');