Fix so Print button for PDF attachments works on Firefox >= 75 (#5125)

pull/7346/head
Aleksander Machniak 5 years ago
parent b35b5a1a26
commit 6b5fc8db95

@ -40,6 +40,7 @@ CHANGELOG Roundcube Webmail
- Fix bug where some message/rfc822 parts could not be attached on forward (#7323)
- Make install-jsdeps.sh script working without the 'file' program installed (#7325)
- Fix performance issue of parsing big HTML messages by disabling HTML5 parser for these (#7331)
- Fix so Print button for PDF attachments works on Firefox >= 75 (#5125)
RELEASE 1.4.3
-------------

@ -405,16 +405,8 @@ function rcube_webmail()
this.enable_command('image-scale', 'image-rotate', !!/^image\//.test(this.env.mimetype));
// Mozilla's PDF.js viewer does not allow printing from host page (#5125)
// to minimize user confusion we disable the Print button
if (bw.mz && this.env.mimetype == 'application/pdf') {
n = 0; // there will be two onload events, first for the preload page
$(this.gui_objects.messagepartframe).on('load', function() {
if (n++) try { if (this.contentWindow.document) ref.enable_command('print', true); }
catch (e) {/* ignore */}
});
}
else
this.enable_command('print', true);
// to minimize user confusion we disable the Print button on Firefox < 75
this.enable_command('print', this.env.mimetype != 'application/pdf' || !bw.mz || bw.vendver >= 75);
if (this.env.is_message) {
this.enable_command('reply', 'reply-all', 'edit', 'viewsource',

Loading…
Cancel
Save