From 5acce4f35723897a72389903ff186aa9ebf0d933 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 28 Jun 2018 16:48:22 +0300 Subject: [PATCH] Don't autocomplete password field --- apps/common/main/lib/view/OpenDialog.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/common/main/lib/view/OpenDialog.js b/apps/common/main/lib/view/OpenDialog.js index a4c5d994b9..89ae9038ac 100644 --- a/apps/common/main/lib/view/OpenDialog.js +++ b/apps/common/main/lib/view/OpenDialog.js @@ -156,13 +156,20 @@ define([ if (this.type == Asc.c_oAscAdvancedOptionsID.DRM) { this.inputPwd = new Common.UI.InputField({ el: $('#id-password-txt'), - type: 'password', + type: 'text', validateOnBlur: false, validation : function(value) { return me.txtIncorrectPwd; } }); 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 { this.initCodePages(); this.updatePreview();