From b9314580a5cfeb275adc54e94a6adfead18b5f10 Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Wed, 27 Jul 2016 10:31:43 +0200 Subject: [PATCH] * Mail: Fix addresses/attachments expansion plus button is not showing up in mail preview in the first load --- mail/js/app.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mail/js/app.js b/mail/js/app.js index e7170f4b2f..fd45a74f64 100644 --- a/mail/js/app.js +++ b/mail/js/app.js @@ -967,15 +967,17 @@ app.classes.mail = AppJS.extend( {build_children: false, data: 'attachmentsBlock', widget:'previewAttachmentArea', line: 'mailPreviewHeadersAttachments'} ]; - dataElem = this.url_email_expandOnClick(expand_content,dataElem); + // Undock the preview before running expandOnClick, because we + // need to have the DOM ready for calculation. + this.mail_disablePreviewArea(false); + dataElem = this.url_email_expandOnClick(expand_content,dataElem); // Update the internal list of selected mails, if needed if(this.mail_selectedMails.indexOf(_id) < 0) { this.mail_selectedMails.push(_id); } - this.mail_disablePreviewArea(false); // Request email body from server IframeHandle.set_src(egw.link('/index.php',{menuaction:'mail.mail_ui.loadEmailBody',_messageID:_id}));