Skip to content
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

input.fileDialogOpened + unhandledPromptBehavior:file #883

Merged
merged 23 commits into from
Mar 5, 2025

Conversation

sadym-chromium
Copy link
Contributor

@sadym-chromium sadym-chromium commented Feb 25, 2025

This PR implements input.fileDialogOpened event and defines unhandledPromptBehavior for file. It should be accompanied by the following changes:
HTML spec: whatwg/html#11030
WebDriver Classic spec: w3c/webdriver#1884
File system access: WICG/file-system-access#452

Open questions:

  1. Should the dialogs be dismissed, or just suppressed in case of user passes "accept" / "ignore"? Current implementation cancels the dialog, which is consistent with other user prompts.
  2. Should the event be merged into browsingContext.userPromptOpened? If so, there will be no way of subscribing only for input.fileDialogOpened event. Also, file dialogs are specific, as it does not support browsingContext.handleUserPrompt.

Re-imagining the #568, addressing #494.


Preview | Diff

Copy link
Contributor

@OrKoN OrKoN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
Copy link
Contributor

@juliandescottes juliandescottes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just 2 nits otherwise lgtm

sadym-chromium and others added 2 commits March 5, 2025 15:03
Co-authored-by: Julian Descottes <jdescottes@mozilla.com>
Co-authored-by: Julian Descottes <jdescottes@mozilla.com>
@sadym-chromium sadym-chromium requested a review from gsnedders March 5, 2025 14:07
@sadym-chromium sadym-chromium changed the title Handle file dialogs input.fileDialogOpened + `unhandledPromptBehavior:file Mar 5, 2025
@sadym-chromium sadym-chromium changed the title input.fileDialogOpened + `unhandledPromptBehavior:file input.fileDialogOpened + unhandledPromptBehavior:file Mar 5, 2025
@sadym-chromium sadym-chromium merged commit 3c02257 into main Mar 5, 2025
5 checks passed
@sadym-chromium sadym-chromium deleted the sadym/input.fileDialogOpened branch March 5, 2025 14:12
github-actions bot added a commit that referenced this pull request Mar 5, 2025
SHA: 3c02257
Reason: push, by sadym-chromium

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@sadym-chromium
Copy link
Contributor Author

@juliandescottes PTAL on the w3c/webdriver#1884

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants