Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
[editor.pdfjs] Fix for IE when Pydio is inside an iFrame.
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Dec 3, 2015
1 parent 1ae2198 commit 527da7c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/src/plugins/editor.pdfjs/class.PDFJSViewer.js
Expand Up @@ -43,6 +43,10 @@ Class.create("PDFJSViewer", AbstractEditor, {
if($$('base').length){
url = $$("base")[0].getAttribute("href");
if(!url.startsWith('http') && !url.startsWith('https')){
if (!window.location.origin) {
// Fix for IE when Pydio is inside an iFrame
window.location.origin = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port: '');
}
url = document.location.origin + url;
}
}
Expand Down

0 comments on commit 527da7c

Please sign in to comment.