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

Calling queryPermission() should raise an error if it's called on a handle that has been moved or deleted #372

Closed
isiah-lloyd opened this issue Jun 4, 2022 · 2 comments

Comments

@isiah-lloyd
Copy link

Currently, if an application calls queryPermission() on a moved or deleted folder or file it still returns prompt. I propose that this should be changed because it currently hinders user experience and may cause confusion.

Example Bad UX

  1. User has already given permission to a folder to app and is returning to app. App's use case makes heavy use of the file system access API and the user will be expecting to use that folder right away
  2. The website opens a modal and asks the user to accept permission to access the folder and presents a button (because calling promptPermission() can't be called without a user gesture)
  3. The user clicks the button and now the browser presents a modal to the user asking them if they wish to grant access.
  4. The application now tries to iterate through the folder using .values(). A DOMException is raised DOMException: A requested file or directory could not be found at the time an operation was processed..
  5. The user is confused and/or frustrated that the folder they just went through 2 permission modals now suddenly has an error.
@isiah-lloyd
Copy link
Author

I now see this issue has also been raised in #313

@a-sully
Copy link
Collaborator

a-sully commented Jun 7, 2022

Closed in favor of #313

@a-sully a-sully closed this as completed Jun 7, 2022
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

No branches or pull requests

2 participants