Merge branch 'master' into 'master'
Fix: Better support for pasting passwords and using password managers During registration users complained about valid passwords shown as invalid. The reasons were them pasting the passwords via middle click (on Linux) or using e.g. pwdhash (password manager for Firefox) which do not trigger the keyup event. As a fix I added listening to the paste and blur events and deferred the validation as the paste event will be triggered before the input is updated. See merge request !57
This commit is contained in:
commit
5202fda5c8
|
@ -627,8 +627,9 @@ if(!window.registrationsClosed) {
|
|||
});
|
||||
|
||||
|
||||
// validate on keyup
|
||||
$('#popup-register input').on('keyup',function(){
|
||||
// validate on keyup / paste / blur
|
||||
$('#popup-register input').on('keyup paste blur',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');
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user