Bug 24444 - No multiple JS property for <input type="file" multiple />
: No multiple JS property for <input type="file" multiple />
: WebKit
: 528+ (Nightly build)
: PC Windows Vista
: P2 Normal
Assigned To:
  Show dependency treegraph
Reported: 2009-03-07 08:21 PST by
Modified: 2009-03-07 11:46 PST (History)

patch (5.12 KB, patch)
2009-03-07 11:39 PST, Adele Peterson
mitz: review+
Review Patch | Details | Formatted Diff | Diff


You need to log in before you can comment on or make changes to this bug.

Description From 2009-03-07 08:21:45 PST
In Safari 4 Beta the great feature of multiple file selection at once landed.
This is a great step forwards but in my opinion, lacks a key feature, which would enable more developers to use it currently.

In JavaScript, you can set whether a file input allows multiple files or not, by using setAttribute() and clearAttribute(). However, you cannot access that attribute as a property, like you can to disable a control (element.disabled). 
This at first glance might seem trivial, but it would enable feature detection, so that we can find out whether the browser supports that attribute or we have to use a fallback solution. If it was implemented, we could use the condition (element.multiple === true || element.multiple === false) to determine browser support. We cannot detect support for this feature as things currently are, since getAttribute will return the same value regardless of whether the browser actually understands the attribute 'multiple' or not.
------- Comment #1 From 2009-03-07 11:39:36 PST -------
Created an attachment (id=28390) [details]
------- Comment #2 From 2009-03-07 11:46:58 PST -------
Committed revision 41511.