Skip to content

Should calling share() "consume" the activation? #136

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

Closed
marcoscaceres opened this issue Dec 13, 2019 · 3 comments · Fixed by #137
Closed

Should calling share() "consume" the activation? #136

marcoscaceres opened this issue Dec 13, 2019 · 3 comments · Fixed by #137

Comments

@marcoscaceres
Copy link
Member

marcoscaceres commented Dec 13, 2019

HTML has a new use activation model that helps deal with situations like:

button.onclick = () => {
  const pShare = navigator.share(stuff);
  // should this reject? 
  const pFS = document.body.requestFullscreen();
}

Given the somewhat modal nature of the share sheet/context-popup menu (Safari desktop), it might make sense to consume the activation?

Doing so might have the nice effect that we can get rid of the internal slot we added to protect against being able to call .share() twice during the same activation phase.

This would be a small breaking change for the currently implemented behavior.

@marcoscaceres
Copy link
Member Author

@othermaciej, we are unsure who to ping on the WebKit side for input on Web Share? Could you suggest someone (or possibly you have an opinion on the above)?

My opinion is that we should consume the activation on share() for the reasons I stated above.

@othermaciej
Copy link
Member

@whsieh @hortont424 @rniwa @jernoble are some people who may have informed opinions.

We don't yet implement the new activation model, but I take it the upshot of this is that a single user action shouldn't be able to open multiple share sheets, or share sheets plus other alerts, or open the sheet plus do other things like play or go fullscreen. That probably seems right.

@marcoscaceres
Copy link
Member Author

Draft proposal #137

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