From c406efe74fc3f03e1a6771be90a8acdce84b9324 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Fri, 16 Oct 2015 13:23:11 +0200 Subject: [PATCH] [IE9] Prevent LDAP password field to become plain text The placeholders library converts the password field to a text field to achieve placeholders functionality. However this is buggy and doesn't properly mask the password when it was set through $el.val(). This workaround sets the type back to password directly after setting a value. --- apps/user_ldap/js/wizard/wizardTabElementary.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/user_ldap/js/wizard/wizardTabElementary.js b/apps/user_ldap/js/wizard/wizardTabElementary.js index 7c1a550c09..f5232e9101 100644 --- a/apps/user_ldap/js/wizard/wizardTabElementary.js +++ b/apps/user_ldap/js/wizard/wizardTabElementary.js @@ -137,6 +137,10 @@ OCA = OCA || {}; this.setElementValue( this.managedItems.ldap_agent_password.$element, agentPwd ); + if (agentPwd && $('html').hasClass('lte9')) { + // make it a password field again (IE fix, placeholders bug) + this.managedItems.ldap_agent_password.$element.attr('type', 'password'); + } }, /** * updates the base DN text area