Skip to content

Commit

Permalink
Merge pull request #14918 from owncloud/fix-password-change-ie8-and-9
Browse files Browse the repository at this point in the history
Don't use placeholder for password in IE8 & 9
  • Loading branch information
jancborchardt committed Mar 26, 2015
2 parents e8109f0 + 0a589d9 commit fc59a37
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions core/js/share.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 !== '') {
Expand Down
8 changes: 7 additions & 1 deletion settings/js/personal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit fc59a37

Please sign in to comment.