diff options
author | Aleksander Machniak <alec@alec.pl> | 2022-08-28 12:56:04 +0300 |
---|---|---|
committer | Aleksander Machniak <alec@alec.pl> | 2022-08-28 12:56:04 +0300 |
commit | fd4fb61d8cd31353988c5d8f139c1b1aceb39b80 (patch) | |
tree | a508b9d638dcfb4e1396ac4312b74d53a16e14cd | |
parent | 1a3a253a7755b7974408f5f6c87da191822a2ec9 (diff) |
Fix regression where clicking on attachment would open and download the file
-rw-r--r-- | program/actions/mail/show.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/program/actions/mail/show.php b/program/actions/mail/show.php index 33436ba29..16be9e023 100644 --- a/program/actions/mail/show.php +++ b/program/actions/mail/show.php @@ -226,7 +226,7 @@ class rcmail_action_mail_show extends rcmail_action_mail_index if (!self::$PRINT_MODE) { $link_attrs = [ 'href' => self::$MESSAGE->get_part_url($attach_prop->mime_id, false), - 'onclick' => sprintf('return %s.command(\'load-attachment\',\'%s\',this)', + 'onclick' => sprintf('%s.command(\'load-attachment\',\'%s\',this); return false', rcmail_output::JS_OBJECT_NAME, $attach_prop->mime_id), 'onmouseover' => $title ? '' : 'rcube_webmail.long_subject_title_ex(this, 0)', 'title' => $title, @@ -779,7 +779,7 @@ class rcmail_action_mail_show extends rcmail_action_mail_index $show_link_attr = [ 'href' => self::$MESSAGE->get_part_url($attach_prop->mime_id, false), 'onclick' => sprintf( - 'return %s.command(\'load-attachment\',\'%s\',this)', + '%s.command(\'load-attachment\',\'%s\',this); return false', rcmail_output::JS_OBJECT_NAME, $attach_prop->mime_id ) |