Fix: Pasting via middle click did not run password validation during registration.
This commit is contained in:
parent
77e8f563d1
commit
4ae1cb69d0
|
@ -627,16 +627,18 @@ if(!window.registrationsClosed) {
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// validate on keyup
|
// validate on keyup / paste
|
||||||
$('#popup-register input').on('keyup',function(){
|
$('#popup-register input').on('keyup paste',function(){
|
||||||
if(validateRegisterForm($('#popup-register'))
|
setTimeout(function () { // defer validation as after paste the content is not immediately available
|
||||||
&& !$('#signup-user-nickname-step2').hasClass('nickname-taken')
|
if(validateRegisterForm($('#popup-register'))
|
||||||
&& !$('#signup-user-email-step2').hasClass('email-in-use')) {
|
&& !$('#signup-user-nickname-step2').hasClass('nickname-taken')
|
||||||
$('#signup-btn-step2').removeClass('disabled');
|
&& !$('#signup-user-email-step2').hasClass('email-in-use')) {
|
||||||
}
|
$('#signup-btn-step2').removeClass('disabled');
|
||||||
else {
|
}
|
||||||
$('#signup-btn-step2').addClass('disabled');
|
else {
|
||||||
}
|
$('#signup-btn-step2').addClass('disabled');
|
||||||
|
}
|
||||||
|
}, 0);
|
||||||
});
|
});
|
||||||
$('#popup-register input').trigger('keyup');
|
$('#popup-register input').trigger('keyup');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user