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

showDirectoryPicker may invoke both modal and not-entirely-modal dialogs, allowing events to be inserted #385

Closed
ronburk opened this issue Sep 7, 2022 · 3 comments · Fixed by GoogleChrome/developer.chrome.com#4865

Comments

@ronburk
Copy link

ronburk commented Sep 7, 2022

Running on latest Chrome release, showDirectoryPicker puts up a modal dialog. However, if the modal dialog reaches the "Request permission to use" stage, showDIrectoryPicker may then display a less modal dialog ("Let site view files?"), one which allows (at least) a hash change event to be generated by user action (e.g., add a character to the existing hash of the URL and hit [enter]).

The disadvantage seems clear: the programmer may be surprised that sometimes invoking a modal dialog will generate an event that gets dispatched before their await of that modal dialog (which normally generates no events) returns. Are there any advantages to this scheme? Is it intentional or accidental? Should a specification cover this behavior?

@a-sully
Copy link
Collaborator

a-sully commented Jan 10, 2023

Most (if not all) permission dialogs on the web are are non-modal. Specifying await does not mean that all other execution pauses...

Also, AFAIK sites can receive events during modal dialogs (e.g. notifications or #72 (soon)), too?

@a-sully a-sully closed this as not planned Won't fix, can't repro, duplicate, stale Jan 10, 2023
@ronburk
Copy link
Author

ronburk commented Jan 11, 2023

Specifying await does not mean that all other execution pauses...
:-)

This article thinks the browser has some modal dialogs. Who knows who they let on chrome.com, tho. :-)

https://developer.chrome.com/articles/file-system-access/

@a-sully
Copy link
Collaborator

a-sully commented Jan 11, 2023

Ah, nice catch. Both the prompts shown for restricted folders and permission prompts are non-modal.

@tomayac is this something you could fix in the article?

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 a pull request may close this issue.

2 participants