Re: [w3c/permissions] "Requesting more permission" algorithms are tightly coupled to prompts (#153)

That all makes sense to me! I may not have explained myself well enough, though, because I'm still unsure about the behavior I had in mind when I submitted this issue. A more concrete example may be in order.

Given the following application code:

```js
navigator.permissions.request({ name: 'geolocation' })
  .then((result) => {
      if (result.state === 'granted') {
        myApp.updateLocation();
      }
    });
```

As you explained in your response, a user may run this code, and the UA may immediately return a [permission state](https://w3c.github.io/permissions/#permission-state) of "denied" or "granted". In this case, no prompt would be displayed at all.

However, the issue I have in mind concerns only those cases where the descriptor's [permission state](https://w3c.github.io/permissions/#permission-state) is "prompt". Taking this for granted, we can expect a prompt to be displayed and the promise returned by `request` to wait in the "pending" state. At this point, if the user ignores the prompt but instead enables Geolocation through other means (e.g. in Firefox: right click, "View Page Info", "Permissions", "Access Your Location", "Allow" checkbox), then:

1. the prompt will continue to be displayed
2. (more importantly) the promise will not be resolved

This is surprising to me because at this point in the hypothetical, the user's intent seems clear.

One way of looking at this is asking, "is the purpose of the prompt to receive input from the user, or is the purpose of the prompt to elicit new information about the user's intent?" If the answer is "the former," then the current text is appropriate. But I believe it's the latter, and that the text should actually wait on [new information about the user's intent](https://w3c.github.io/permissions/#new-information-about-the-users-intent), regardless of the prompt.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/permissions/issues/153#issuecomment-311515668

Received on Tuesday, 27 June 2017 23:39:26 UTC