mirror of https://github.com/zulip/zulip.git
signup, settings: Update password strength meter on input events.
Pasting a generated password into the password box triggers neither a change event (until the password box is unfocused) nor a keyup event. Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
parent
a264c84397
commit
12e6189970
|
@ -13,7 +13,7 @@ $(function () {
|
|||
// was just reloaded due to a validation failure on the backend.
|
||||
common.password_quality(password_field.val(), $('#pw_strength .bar'), password_field);
|
||||
|
||||
password_field.on('change keyup', function () {
|
||||
password_field.on('input', function () {
|
||||
// Update the password strength bar even if we aren't validating
|
||||
// the field yet.
|
||||
common.password_quality($(this).val(), $('#pw_strength .bar'), $(this));
|
||||
|
|
|
@ -372,7 +372,7 @@ exports.set_up = function () {
|
|||
});
|
||||
});
|
||||
|
||||
$('#new_password').on('change keyup', function () {
|
||||
$('#new_password').on('input', function () {
|
||||
var field = $('#new_password');
|
||||
common.password_quality(field.val(), $('#pw_strength .bar'), field);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue