aboutsummaryrefslogtreecommitdiff
path: root/p
diff options
context:
space:
mode:
Diffstat (limited to 'p')
-rw-r--r--p/scripts/main.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/p/scripts/main.js b/p/scripts/main.js
index e8bd66fc1..9b6524b01 100644
--- a/p/scripts/main.js
+++ b/p/scripts/main.js
@@ -1134,17 +1134,18 @@ function init_feed_observers() {
}
function init_password_observers() {
- $('input[type="password"] + a.btn.toggle-password').on('click', function(e) {
+ $('.toggle-password').on('mousedown', function(e) {
var button = $(this);
- var passwordField = $(this).siblings('input[type="password"]');
-
+ var passwordField = $('#' + button.attr('data-toggle'));
passwordField.attr('type', 'text');
button.addClass('active');
- setTimeout(function() {
- passwordField.attr('type', 'password');
- button.removeClass('active');
- }, 2000);
+ return false;
+ }).on('mouseup', function(e) {
+ var button = $(this);
+ var passwordField = $('#' + button.attr('data-toggle'));
+ passwordField.attr('type', 'password');
+ button.removeClass('active');
return false;
});