Skip to content

Commit

Permalink
Fix PDF support detection for Firefox PDF.js (#1488972)
Browse files Browse the repository at this point in the history
  • Loading branch information
alecpl committed Apr 28, 2013
1 parent d0f616c commit de6e225
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
@@ -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)
Expand Down
9 changes: 9 additions & 0 deletions program/js/app.js
Expand Up @@ -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;
};

Expand Down
Binary file added program/resources/blank.pdf
Binary file not shown.

0 comments on commit de6e225

Please sign in to comment.