🐛 Add missing cancel event to <input type=file>#29639
Conversation
https://html.spec.whatwg.org/multipage/indices.html#event-cancel: Fired at dialog elements when they are canceled by the user (e.g., by pressing the Escape key), or at input elements in the File state when the user does not change their selection
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Preview URLs (7 pages)Flaws (9)Note! 4 documents with no flaws that don't need to be listed. 🎉 URL:
URL:
URL:
(comment last updated: 2023-11-20 14:54:46) |
|
Before adding a link to the cancel event in the technical summary, the page needs to be created. See my comment in the issue |
Sorry for replying so late, I will create the page later. |
estelle
left a comment
There was a problem hiding this comment.
I made some suggested edits. I think we need to be clearer about the multiple ways the cancel event may be thrown.
Co-authored-by: Estelle Weyl <[email protected]>
Co-authored-by: Estelle Weyl <[email protected]>
Co-authored-by: Estelle Weyl <[email protected]>
Co-authored-by: Estelle Weyl <[email protected]>
estelle
left a comment
There was a problem hiding this comment.
I find the behavior of reselecting the same files unexpected, so want to make sure that it's clear. I made two suggestions to emphasize that. I am not sure if my suggestions are overkill.
also, when you're ready for a re-review, click the little icon next to my name so that you see a small brown dot instead of the icon. This informs me that the PR is ready for re-review.
Co-authored-by: Estelle Weyl <[email protected]>
Co-authored-by: Estelle Weyl <[email protected]>
This comment was marked as spam.
This comment was marked as spam.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
I think instead of moving page from |
* Revert ":bug: Add missing `cancel` event to `<input type=file>` (#29639)" This reverts commit 0900a56. * update & finish docs * Update files/en-us/web/api/htmlinputelement/cancel_event/index.md Co-authored-by: Joshua Chen <[email protected]> --------- Co-authored-by: Estelle Weyl <[email protected]> Co-authored-by: Joshua Chen <[email protected]>
Description
Add
cancelevent to<input type=file>.Motivation
👎 People are using hacks (
window.addEventListener('focus')) to detect cancellations of file dialogs.An example from GoogleChromeLabs/browser-fs-access
However, in https://html.spec.whatwg.org/multipage/indices.html#event-cancel:
It helps a lot.
Additional details
Reference: https://html.spec.whatwg.org/multipage/indices.html#event-cancel
Related issues and pull requests
🔨 Fixes #22157.