PDA

View Full Version : pdf viewer in iframe problem



oturkan
16 Apr 2014, 3:49 AM
Hi,

please visit http://gokyuzu.azurewebsites.net. Click report viewer and take pdf report on IE11. when you got the report click customer icon. Customer window stay behind iframe. How can i handle that

Gary Schlosberg
17 Apr 2014, 6:39 AM
I tried your site out in Chrome and it works as expected. In IE11/Windows 7, the OS sees the PDF as an aspx file and doesn't know how to open it, so I never see the PDF. When I try with IE11/Windows 8, the OS opens the PDF in a completely separate side window. No Windows expert here -- perhaps there is a setting to control this?

oturkan
17 Apr 2014, 9:05 AM
thanks for replay. when i tried on firefox, chrome works, ie as expected but ie11/win8 z-index problem i think. may be control setting. thanks again

Gary Schlosberg
17 Apr 2014, 11:23 PM
I managed to reproduce this after downloading a reader that would display in the desktop. I'm still trying to figure out if this is somehow an ExtJS issue. Hopefully someone else here has dealt with this problem and can share a solution.

cdellasanta
30 Jun 2014, 5:56 AM
Same here with extjs 4.2.1: PdfViewer in Iframe that does cover load masks, popup Windows (and messages) on IE.

Found explanation here:
http://stackoverflow.com/questions/12911428/z-index-does-not-work-in-ie7-ie8-with-pdf-in-iframe

And as solution I only had to set

Ext.useShims = true;
for IE browsers.


EDIT: Additionally you might want an alert message or modal popup wintow to be really modal...
To achive that you have to pach/override class Ext.ZIndexManager method _showModalMask to activate the code meant for ie6 only. (In my opinion should be done automatically if the Ext.useShims flag is enabled)

Edit 2: Sadly the same issue applies for me in Safari, and this trick does not solves the problem.

Hope this helps.

mpflaging
11 Jun 2015, 9:30 AM
You can also temporarily remove the iframe:



onWindowShow: function(component, eOpts) {
//hide the pdf whenever a window is shown
Ext.ComponentQuery.query('#pdfContainer')[0].hide();
},

onWindowHide: function(component, eOpts) {
Ext.ComponentQuery.query('#pdfContainer')[0].show();
}


But you need to be careful if you have a popup window on top of a popup window. You'll need to prevent the .show() from happening when the top level popup gets hidden. (It's pretty easy.)