Commit 8e0b0358 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Fix for safari opening new window on file upload

parent 6f53cf7c
...@@ -439,6 +439,12 @@ function FileUploader(element, uploadscript, statevars, foldername, folderid, up ...@@ -439,6 +439,12 @@ function FileUploader(element, uploadscript, statevars, foldername, folderid, up
'id':'iframe'+self.nextupload, 'id':'iframe'+self.nextupload,
'src':'blank.html', 'src':'blank.html',
'style':'display: none;'})); 'style':'display: none;'}));
// Safari loads the upload page in a new window when the iframe has display set to none.
if (navigator.userAgent.indexOf('Safari/') != -1) {
setDisplayForElement('width: 1px; height: 1px;', 'iframe'+self.nextupload);
}
//'style':'width: 1px; height: 1px;'}));
setNodeAttribute(self.form, 'target', 'iframe' + self.nextupload); setNodeAttribute(self.form, 'target', 'iframe' + self.nextupload);
for (property in self.statevars) { for (property in self.statevars) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment