Closed Bug 1201106 Opened 9 years ago Closed 9 years ago

When the 'directory' attribute is set on <input type=file>, .files must be set to null

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla43
Tracking Status
firefox43 --- fixed

People

(Reporter: jwatt, Assigned: jwatt)

References

Details

Attachments

(1 file)

When the 'directory' attribute is set on <input type=file>, .files must be set to null. See the text "If this attribute is set, input.files MUST return null.":

  https://wicg.github.io/directory-upload/proposal.html#attributes-1

For the rational, see:

  https://github.com/WICG/directory-upload/issues/8
Attached patch patchSplinter Review
Assignee: nobody → jwatt
Attachment #8659227 - Flags: review?(amarchesini)
Comment on attachment 8659227 [details] [diff] [review]
patch

Review of attachment 8659227 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/html/HTMLInputElement.cpp
@@ +2480,5 @@
>    if (mType != NS_FORM_INPUT_FILE) {
>      return nullptr;
>    }
>  
> +  if (HasAttr(kNameSpaceID_None, nsGkAtoms::directory)) {

Don't we want to check the value as well?
Attachment #8659227 - Flags: review?(amarchesini) → review+
No, it's a boolean attribute.
https://hg.mozilla.org/mozilla-central/rev/86014d39a1c5
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: