Closed
Bug 1282870
Opened 8 years ago
Closed 8 years ago
input.webkitdirectory doesn't work
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla50
Tracking | Status | |
---|---|---|
firefox50 | --- | fixed |
People
(Reporter: dietrich, Assigned: baku)
References
Details
(Keywords: dev-doc-needed)
Attachments
(1 file, 1 obsolete file)
2.60 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
This feature added in bug 1258489 for compat, but is non-functional.
Reporter | ||
Comment 1•8 years ago
|
||
Using Nightly 50.0a1 (2016-06-28) and Addy Osmani's sample at http://jsfiddle.net/addyo/Ha979/ I got the following results: * File picker only picks files, not directories, which seems like the opposite of the expected behavior. Chrome doesn't allow file picking, only directories (which perhaps is a bug... https://bugs.chromium.org/p/chromium/issues/detail?id=59818). * Dropping a directory onto the <input> lists the directory name, not the files contained within. Chrome lists the files contained within the dropped directory, but not the directory itself.
Comment 2•8 years ago
|
||
webkitdirectory is not enabled by default, so did you actually enable the pref dom.webkitBlink.dirPicker.enabled? webkitdirectory implementation is still missing stuff like form submission, though that is about to land.
Flags: needinfo?(dietrich)
Reporter | ||
Comment 3•8 years ago
|
||
Yes, see my final comment from bug 1258489. Perhaps I have done something wrong. I'm continually told in bugs I report that I must not be seeing what I'm seeing. I'd prefer to be incorrect ;) You can try the URL above for yourself, it's quite simple to test there.
Flags: needinfo?(dietrich)
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → amarchesini
Assignee | ||
Comment 4•8 years ago
|
||
Attachment #8766214 -
Flags: review?(bugs)
Comment 5•8 years ago
|
||
(In reply to Dietrich Ayala (:dietrich) from comment #3) > Perhaps I have done something wrong. I'm continually told in bugs I report > that I must not be seeing what I'm seeing. I'd prefer to be incorrect ;) You > can try the URL above for yourself, it's quite simple to test there. Hah. It wasn't just clear from this bug report that the pref was enabled :)
Comment 6•8 years ago
|
||
Comment on attachment 8766214 [details] [diff] [review] fix.patch Isn't the issue that we don't handle webkitdirectory attribute in nsFileControlFrame::CreateAnonymousContent
Attachment #8766214 -
Flags: review?(bugs) → review-
Assignee | ||
Comment 7•8 years ago
|
||
Attachment #8766214 -
Attachment is obsolete: true
Attachment #8766252 -
Flags: review?(bugs)
Comment 8•8 years ago
|
||
Comment on attachment 8766252 [details] [diff] [review] fix.patch Could you cache pref values in some bool bool isDir = Preferences::GetBool("dom.input.dirpicker", false) && content && content->HasAttr(kNameSpaceID_None, nsGkAtoms::directory);; bool isWebkitDir = isDir ? false : Preferences::GetBool("dom.webkitBlink.dirPicker.enabled", false) && content && content->HasAttr(kNameSpaceID_None, nsGkAtoms::webkitdirectory); and then use the bool vars and not check the pref in many places.
Attachment #8766252 -
Flags: review?(bugs) → review+
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/f843a97323da HTMLInputElement.webkitdirectory should show a DirPicker, r=smaug
Comment 10•8 years ago
|
||
bustage and backedout -> https://treeherder.mozilla.org/logviewer.html#?job_id=30884007&repo=mozilla-inbound
Flags: needinfo?(amarchesini)
Comment 11•8 years ago
|
||
Backout by cbook@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/72993ec9d303 Backed out changeset f843a97323da for bustage on a CLOSED TREE
Comment 12•8 years ago
|
||
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/5c839b37704c HTMLInputElement.webkitdirectory should show a DirPicker, r=smaug
Comment 13•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5c839b37704c
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox50:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
Comment 14•8 years ago
|
||
In order to update the docs, if I understand correctly both HTMLInputElement.webkitdirectory and file.webkitrelativepath work only in Gecko50+ instead of Gecko49. Are there any plan to uplift this to Gecko49? (Not that I want too, just to foresee what doc update is needed)
Keywords: dev-doc-needed
Assignee | ||
Comment 15•8 years ago
|
||
We don't want uplift this patch. And everything is disabled by pref. We want to enable this feature when the Entries API is fully implemented. See bug 1284987.
Flags: needinfo?(amarchesini)
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•