-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chrome for Android supports webkitdirectory on input #25036
base: main
Are you sure you want to change the base?
Conversation
2d0240c
to
989aaa9
Compare
989aaa9
to
bccc4e1
Compare
I see the errors:
How can I convey the meaning I intend while passing these checks? |
Does this make sense? "chrome_android": {
"version_added": "132",
"notes": [
"In Chrome 131, the property could be set, but choosing a directory crashed the browser.",
"Before Chrome 131, the property could be set, but had no effect."
]
}, |
It makes sense, but based on the following existing case, it might be more consistent to move those notes to a [131, 132) statement with partial implementation. browser-compat-data/html/elements/a.json Lines 198 to 204 in 18a60c0
The reasoning probably is that these notes are not relevant for Chrome 132, where the feature is fully supported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See this comment.
If feels weird to mark the implementation partial in Chrome 131. In a way, this was more functional before Chrome 131 than in Chrome 131. In Chrome 131, this crashed the browser. Before Chrome 131, it was merely ignored. |
If possible, I'd mark the implementation unsupported until Chrome 131 and differently unsupported from Chrome 131 until Chrome 132, but I don't think yari supports that. |
There is no perfect solution, but it's definitely also weird to have the note on the current support statement, as if the caveat in Chrome 131 was relevant for Chrome 132+. @ddbeck has proposed to allow notes with version ranges, which could help here. I really think it's fine to add the partial implementation entry for Chrome 131. In MDN's BCD table, you wouldn't notice this version, unless you actively expand the history. |
Added to tomorrow's BCD call agenda. |
I think the issue here is that the notes are vague and we're missing data for the The primary problem that the
The failure mode here is not explained. I think there are three plausible readings:
In the first two cases, you'd have a
This sounds like the attribute reflection works just fine. I'd much rather have a note (and partial implementation) on the hypothetical One last note: I assumed that 131 still crashes, not that 131 shipped and was hotfixed to fix this crash—otherwise some very different notes and data apply. Writing the notes in the present tense (i.e., "In Chrome for Android 131, choosing a directory crashes the browser.") helps avoid this kind of ambiguity. |
@danielhjacobs Would you be up for adding that feature under |
This is the one that applies here. |
Additionally, 131 does still crash |
In #24543 (comment), @caugner suggested |
Isn't it more accurate to track that with https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#webkitdirectory? |
Something like this for input type file - webkitdirectory? browser-compat-data/html/elements/input/password.json Lines 44 to 77 in b35c062
|
Unless I misunderstood something, the bottom line seems to be that we need three support statements here (on
I think it makes more sense to keep it next to the other |
But didn't @ddbeck say:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Claas Augner <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still wasn't sure what the notes meant (even after reading the linked bugs). I did a bit of testing and ended up with this proposed, somewhat awkward, compromise. (I went back and forth on it a few times.)
I think the correct story to tell here is:
-
HTMLInputElement.prototype.webkitdirectory
is a real property. If you try to feature detect using this property, you'll get misleading results. To me, this implies a partial implementation. This follows the guidelines closely. -
In these cases, the only thing that
<input type="file" webkitdirectory>
actually does is get reflected toHTMLInputElement.prototype.webkitdirectory
. This means we have to have a note that tells developers why that's happening, but we don't need to show that it's partially supported.
Sorry for the length here, but this is subtly wrong in a surprising way (you more often see the attribute reflections not work while the element attribute does; this is the reverse).
Co-authored-by: Daniel D. Beck <[email protected]>
Summary
Android Chrome now supports webkitdirectory. It crashed the browser in Chrome 131, but a fix for that came out in Chrome 132 and a fix for webkitRelativePath to use the actual path instead of the content-URI also barely eked into Chrome 132 (seems to be included in Chrome Canary 132.0.6834.0)
Test results and supporting details
https://issues.chromium.org/issues/40248532
https://issues.chromium.org/issues/376834374
https://issues.chromium.org/issues/377716464
Related issues
Fixes #24938