From 55e1226dfee2778d92e7dbaf9e907f20a80c073b Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Mon, 16 Mar 2015 13:11:44 +0100 Subject: [PATCH 1/2] Don't use placeholder for password in IE8 & 9 * the placeholder is in IE 8 and 9 just set as text and styled a bit grey. If the form is then serialized without typing something in the placeholder is sent as value * this fixes that behaviour for the password field and properly detects empyt passwords * fixes #14912 --- settings/js/personal.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/settings/js/personal.js b/settings/js/personal.js index e2fb6f025f1..302906702bd 100644 --- a/settings/js/personal.js +++ b/settings/js/personal.js @@ -172,7 +172,13 @@ $(document).ready(function () { $('#pass2').showPassword().keyup(); } $("#passwordbutton").click(function () { - if ($('#pass1').val() !== '' && $('#pass2').val() !== '') { + var isIE8or9 = html.hasClass('lte9'); + // FIXME - TODO - once support for IE8 and IE9 is dropped + // for IE8 and IE9 this will check additionally if the typed in password + // is different from the placeholder, because in IE8/9 the placeholder + // is simply set as the value to look like a placeholder + if ($('#pass1').val() !== '' && $('#pass2').val() !== '' + && !(isIE8or9 && $('#pass2').val() === $('#pass2').attr('placeholder'))) { // Serialize the data var post = $("#passwordform").serialize(); $('#passwordchanged').hide(); From 0a589d938ce89adae7119d6f84f151644bdf166f Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Thu, 26 Mar 2015 11:55:50 +0100 Subject: [PATCH 2/2] fix enforced password for share in IE8 --- core/js/share.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/js/share.js b/core/js/share.js index 061ac6affa2..b9b4a5bc754 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -989,6 +989,11 @@ $(document).ready(function() { }); } else { $('#linkPass').slideToggle(OC.menuSpeed); + // TODO drop with IE8 drop + if(html.hasClass('ie8')) { + $('#linkPassText').attr('placeholder', null); + $('#linkPassText').val(''); + } $('#linkPassText').focus(); } if (expireDateString !== '') {