|
|
Nasty little Safari bug?
|
|
|
|
Grizzled Veteran
Join Date: Oct 2003
Status:
Offline
|
|
In developing a site manger interface, I've ran into a nasty bug with Safari:
File inputs fail to work if they are in a hidden container.
Because some of the forms would look rather complex and long on a single "page", I've decided to split them into common sections and each section is on its own tab. I'm using tab-pane as the base for this, which is a great option because it remebers which tab was last selected on each page, so if for item X you use tab B alot, that will be the default selected tab when you go to edit item X.
Some forms have file inputs, namely for images, that I place on their own tab, adequately called "Images". However, I have discovered that in Safari, if the Images tab is not selected when submitting the form, no files will be uploaded.
PHP is the server code I am running, and printing the $_FILES array shows that indeed if the Images tab is not select in Safari, the $_FILES array is completely empty upon form submission.
I've tested in Firefox, and it behaves as expected, i.e. the entire form is submitted including files.
Safari has no problems submitting the rest of the form. It seems to not submit file fields if they are in a hidden container (when a tab is selected, all other tabs contaner DIVs are hidden).
Has anyone else experienced this? This has got to be the most annoying bug I've ran into... And what can I do? Have a note for Safari users telling them to be sure to select the Images tab before submitting the form? I've already tried having all Image tabs shown when the form is submitted if the browser is Safari, but even that did not work (I guess they were not shown quick enough?)
|
The only thing necessary for evil to flourish is for good men to do nothing
- Edmund Burke
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Sep 2001
Location: MA, USA
Status:
Offline
|
|
http://www.versiontracker.com/dyn/moreinfo/macosx/27294
I know this doesn't help fix your problem, but download this and try it. It downloads the latest Webkit from apple so you can see what the next version of safari will render pages like. It doesn't replace your current version, it just installs a second executable. Just don't run both at the same time. This will atleast allow you to see if this issue is still present in the future safari and maybe you can file a bug if it is.
|
AXP
ΔΣΦ
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Oct 2003
Status:
Offline
|
|
Originally Posted by TheMosco
Thanks I'll try it and see if it is still there, but even if so, it still remains an issue for all Safari 1.3 or earlier users.
And as for filing a bug, I went to the Safari bug report site, or tried to, and you have to be an ADC member to file a bug report... no thanks, I'm not paying $90 just to file a bug report.
I'm putting together a simple example page that clearly demonstrates the issue, if anyone who does have an ADC account would like to file the bug (which I will post here once it is online).
(
Last edited by madmacgames; Jul 16, 2005 at 12:06 AM.
)
|
The only thing necessary for evil to flourish is for good men to do nothing
- Edmund Burke
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Oct 2003
Status:
Offline
|
|
sorry, I can't use that Nightshift thingy. I am still running Panther 10.3.9
|
The only thing necessary for evil to flourish is for good men to do nothing
- Edmund Burke
|
|
|
|
|
|
|
|
Mac Elite
Join Date: Sep 2001
Location: MA, USA
Status:
Offline
|
|
Originally Posted by madmacgames
Thanks I'll try it and see if it is still there, but even if so, it still remains an issue for all Safari 1.3 or earlier users.
And as for filing a bug, I went to the Safari bug report site, or tried to, and you have to be an ADC member to file a bug report... no thank, I'm paying $90 just to file a damn bug report.
I'm putting together a simple example page that clearly demonstrates the issue, if anyone who does have an ADC account would like to file the bug (which I will post here once it is online).
stinks about 10.3.9. ADC accounts are free btw. You don't have to pay. Sorry i couldn't be more help
|
AXP
ΔΣΦ
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Oct 2003
Status:
Offline
|
|
(
Last edited by madmacgames; Aug 8, 2005 at 10:27 AM.
)
|
The only thing necessary for evil to flourish is for good men to do nothing
- Edmund Burke
|
|
|
|
|
|
|
|
Dedicated MacNNer
Join Date: Nov 2001
Location: Are Eye
Status:
Offline
|
|
Safari 2.0 (412.2) still shows an empty files array. Well, sorta, the error key has a value of 4. And like you said, it only show up if the files tab is showing on submit.
Other text fields all seem to show up as expected though.
|
|
|
|
|
|
|
|
|
Grizzled Veteran
Join Date: Oct 2003
Status:
Offline
|
|
Originally Posted by registered_user
Safari 2.0 (412.2) still shows an empty files array. Well, sorta, the error key has a value of 4. And like you said, it only show up if the files tab is showing on submit.
Well that's ok. You should get an array with blank keys and an error 4 if no files are submitted, but you should still have a non-empty FILES array. You can choose files to upload if you want to as well for the test, the script doesn't do anything with them. The main point of the bug is that if a file input is in a hidden container, Safari does not submit it along with the rest of the form.
Thanks for the Safari 2 report... I'll be filing a bug report with Apple here shortly.
|
The only thing necessary for evil to flourish is for good men to do nothing
- Edmund Burke
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Forum Rules
|
|
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
|
|
|
|
|
|