From 1b4052a40f8cdc715c2f96f3d00383277192668a Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Tue, 6 Sep 2022 13:08:20 +0200 Subject: [PATCH] Fix predefined compose's toolbar actions no longer getting set --- mail/js/app.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mail/js/app.js b/mail/js/app.js index ddf94b5749..72735860ed 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -6158,12 +6158,11 @@ app.classes.mail = AppJS.extend( { if (toolbar && toolbar.options.actions[actions[i]]) { - var $d = jQuery('#composeToolbar-'+actions[i]); - if ($d.length > 0 - && toolbar._actionManager.getActionById(actions[i]).checkbox + let d = document.getElementById('mail-compose_composeToolbar-'+actions[i]); + if (d && toolbar._actionManager.getActionById(actions[i]).checkbox && !toolbar._actionManager.getActionById(actions[i]).checked) { - $d.trigger('click'); + d.click(); } } else