Added a temporary fix for Chrome bug

* chrome PDF Viewer plugin shrinks PDF and entire surrounding page
when including a pdf inside an iframe
* This is a temporary fix to support old versions of chrome as it
seems to be fixed on latest builds

FEA: ItEr02S03MigracionZK5
This commit is contained in:
Farruco Sanjurjo 2011-02-21 10:30:34 +01:00
parent cd4f463366
commit c5c0cdb860
2 changed files with 25 additions and 0 deletions

View file

@ -0,0 +1,24 @@
/*
* This function is a temporary fix
* for a bug with chrome.
*
* bug-url: http://code.google.com/p/chromium/issues/detail?id=65395
*
* bug-description: chrome PDF Viewer plugin shrinks PDF and entire surrounding page
* when including a pdf inside an iframe
*
* bug-notes: this bug seems to be fixed since version 9.0.597.84
* but we should keep this fix for a while to support people with
* older versions
*
* */
zk.afterLoad(function(){
old = zAu.cmd0.download;
zAu.cmd0.download = function(url){
if( ! url.match(/\.pdf$/) ){
return old.apply(url);
}
window.open(url, "Report");
};
});

View file

@ -1,3 +1,4 @@
<package name="common.components" language="xul/html">
<script src="ChromePDFBugFix.js" browser="safari"/>
<widget name="JasperreportComponent"/>
</package>