From ad132d43b0e452b13c99a08f940486d01aaa53a9 Mon Sep 17 00:00:00 2001 From: Brian Federle Date: Mon, 6 Aug 2012 14:33:41 -0700 Subject: [PATCH] CS-15518: Fix password field garbling on login screen. From ASF master @ b10a6196355df655800859adea8760a662b288a5 --- ui/scripts/ui-custom/login.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ui/scripts/ui-custom/login.js b/ui/scripts/ui-custom/login.js index 40d8aebbe4c..c2e50bb65a1 100644 --- a/ui/scripts/ui-custom/login.js +++ b/ui/scripts/ui-custom/login.js @@ -34,6 +34,17 @@ $login.appendTo('html body'); $('html body').addClass('login'); + // Remove label if field was auto filled + $.each($form.find('label'), function() { + var $label = $(this); + var $input = $form.find('input').filter(function() { + return $(this).attr('name') == $label.attr('for'); + }); + if ($input.val()) { + $label.hide(); + } + }); + // Form validation $form.validate();