From 32b07bd12ed2f2b7d6321ac0a59887dabada131e Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 4 Jul 2017 13:24:38 +0200 Subject: [PATCH] Fix opening file sharing compose dialog sets the password field automatically in Safari --- mail/js/app.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mail/js/app.js b/mail/js/app.js index dd12886536..614677c3dd 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -218,6 +218,13 @@ app.classes.mail = AppJS.extend( ); break; case 'mail.compose': + // Set password field of file sharing to empty in + // initialization because safari does not respect + // autocomplete-off attribute. This hack should be + // removed once the issue is solved. + var password = this.et2.getWidgetById('password'); + if (password) password.set_value(''); + if (this.et2.getWidgetById('composeToolbar')._actionManager.getActionById('pgp') && this.et2.getWidgetById('composeToolbar')._actionManager.getActionById('pgp').checked || this.et2.getArrayMgr('content').data.mail_plaintext &&