From 20b95f2b4c54b394c9ef418a9d8d78e4013ed442 Mon Sep 17 00:00:00 2001 From: Khushil Mistry Date: Sun, 8 Mar 2020 18:54:18 +0100 Subject: [PATCH] Bug 1620206 - Account Manager: S/MIME cert selection not saved if closing. r=kaie DONTBUILD --HG-- extra : amend_source : 0b6c66ffcb05b9755cede87011834134808f740b --- mailnews/extensions/smime/content/am-smime.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mailnews/extensions/smime/content/am-smime.js b/mailnews/extensions/smime/content/am-smime.js index 9d5a869bd0..7291013604 100644 --- a/mailnews/extensions/smime/content/am-smime.js +++ b/mailnews/extensions/smime/content/am-smime.js @@ -145,6 +145,7 @@ function onPreInit(account, accountValues) { function onSave() { smimeSave(); + window.dispatchEvent(new CustomEvent("prefchange")); } function smimeSave() { @@ -465,6 +466,7 @@ function enableCertSelectButtons() { .getElementById("encryptionCertClearButton") .setAttribute("disabled", "true"); } + onSave(); } function smimeClearCert(smime_cert) { @@ -497,6 +499,4 @@ function openDeviceManager() { function smimeOnLoadEditor() { smimeInitializeFields(); - document.addEventListener("dialogaccept", smimeOnAcceptEditor); - window.dispatchEvent(new CustomEvent("prefchange")); }