Fix PDF support detection for Firefox PDF.js (#1488972)

pull/63/merge
Aleksander Machniak 11 years ago
parent d0f616c6e0
commit de6e22573e

@ -1,6 +1,7 @@
CHANGELOG Roundcube Webmail
===========================
- Fix PDF support detection for Firefox PDF.js (#1488972)
- Fix messages list focus issue in Internet Explorer (#1489058)
- Add db_prefix configuration option in place of db_table_*/db_sequence_* options
- Make possible to use db_prefix for schema initialization in Installer (#1489067)

@ -6721,6 +6721,15 @@ function rcube_webmail()
return 1;
}
// this will detect any pdf plugin including PDF.js in Firefox
var obj = document.createElement('OBJECT');
obj.onload = function() { rcmail.env.browser_capabilities.pdf = 1; };
obj.onerror = function() { rcmail.env.browser_capabilities.pdf = 0; };
obj.style.display = 'none';
obj.type = 'application/pdf';
obj.data = 'program/resources/blank.pdf';
document.body.appendChild(obj);
return 0;
};

Binary file not shown.
Loading…
Cancel
Save