Don't autocomplete password field

This commit is contained in:
Julia Radzhabova 2018-06-28 16:48:22 +03:00
parent a7868d82eb
commit 5acce4f357

View file

@ -156,13 +156,20 @@ define([
if (this.type == Asc.c_oAscAdvancedOptionsID.DRM) { if (this.type == Asc.c_oAscAdvancedOptionsID.DRM) {
this.inputPwd = new Common.UI.InputField({ this.inputPwd = new Common.UI.InputField({
el: $('#id-password-txt'), el: $('#id-password-txt'),
type: 'password', type: 'text',
validateOnBlur: false, validateOnBlur: false,
validation : function(value) { validation : function(value) {
return me.txtIncorrectPwd; return me.txtIncorrectPwd;
} }
}); });
this.$window.find('input').on('keypress', _.bind(this.onKeyPress, this)); this.$window.find('input').on('keypress', _.bind(this.onKeyPress, this));
this.$window.find('input').on('input', function(){
if ($(this).val() !== '') {
($(this).attr('type') !== 'password') && $(this).attr('type', 'password');
} else {
$(this).attr('type', 'text');
}
});
} else { } else {
this.initCodePages(); this.initCodePages();
this.updatePreview(); this.updatePreview();