Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
8e0b0358
Commit
8e0b0358
authored
Jan 29, 2007
by
Richard Mansfield
Browse files
Fix for safari opening new window on file upload
parent
6f53cf7c
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/file/js/file.js
View file @
8e0b0358
...
@@ -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
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment