According the the HTML 4 specification:
Hidden controls and controls that are not rendered because of style sheet settings may still be successful.
Safari does not submit hidden file input elements.
Updated URL to show a working example of the bug.
Confirmed. Firefox 1.5 behaves as noted (it submits the element even though it's hidden via style). Test on Webkit nightly r12619.
This bug may be related to Bug 6926 and Bug 3581 (other hidden-by-style issues).
This is not a regression from Safari 2.0.3 (417.8) on 10.4.4 as it behaves the same way.
Glen, could you attach the current index.php source from your web site to this bug as a test case? Thanks!
Created attachment 6327 [details]
Source code for test case
Curretnly I am using this bug to foil bug http://bugzilla.opendarwin.org/show_bug.cgi?id=8248
*** Bug 8584 has been marked as a duplicate of this bug. ***
that is rdar://4573998
(In reply to comment #9)
> that is rdar://4573998
There's nothing in that bug report (Radar 4573998 ) that mentions hidden file input elements. Mark, if you know that this is indeed what's going on in that bug, then please add some clarification in Radar.
There are multiple ways to be "hidden" by style. I've retitled this to specifically talk about "display:none" as opposed to, say, "visibility:hidden".
Created attachment 14138 [details]
patch with manual test and change log
Reading this patch makes me wish we had classes that encapsulated the behavior of different Input types, instead of switch statements all over HTMLInputElement. This will likely become more important as we add support for more kinds of form controls, as suggested by Web Forms 2.
Transmitting file data ......
Committed revision 21010.