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

[Popup] Should focus changes between documents clear open popup in a given document? #319

Closed
melanierichards opened this issue Apr 9, 2021 · 3 comments
Labels
popover The Popover API stale

Comments

@melanierichards
Copy link
Collaborator

This question refers to use cases where a given host/parent document may contain 1+ embedded documents (e.g. iframed content). Both the parent and embedded documents may have <popup>s.

On MS Edge Explainers #433, @BoCupp-Microsoft said:

If focus leaves that active document, because the browser or tab or document lost focus, then I expect its popups to be dismissed.

@domenic mentioned (I believe partially in response to the above comment, please correct me if I'm wrong):

In general any kind of way in which documents can affect each other is pretty unusual on the web platform, and poses some security and privacy issues. I'd definitely suggest sticking to everything being document-scoped, and not giving any particular document special treatment.

Should loss of focus in a host or embedded document clear that document's open popup from the stack? Examples:

  • A user visits a web page where a "teaching UI" popup instructs them how to use some new feature of the website. The user effectively ignores this and immediately clicks into a commenting widget embedded on the page via an iframe. Should the teaching UI popup close?
  • A user is interacting with a web-based publishing tool composed of several separate <iframe>s. They choose an item from a combobox (whose listbox is a popup) in iframe A. The user hits the tab key, and immediately passes into iframe B. Should the combobox popup close?
@melanierichards melanierichards added the popover The Popover API label Apr 9, 2021
@melanierichards
Copy link
Collaborator Author

We should fully consider any privacy-security ramifications and mitigations. From a user experience perspective, I would expect that any popups would be dismissed as focus crosses boundaries between host and embedded documents. Many complex web applications are constructed as "several iframes in a web page suit", and users would be none the wiser as to the implementation. Not light dismissing in these cases could get an application into a weird state where multiple popups are open and displayed simultaneously, and a user wouldn't understand why.

@github-actions
Copy link

There hasn't been any discussion on this issue for a while, so we're marking it as stale. If you choose to kick off the discussion again, we'll remove the 'stale' label.

@mfreed7
Copy link
Collaborator

mfreed7 commented Mar 24, 2022

I believe this is mostly a duplicate of #415 (comment), which discusses loss-of-focus being a light dismiss trigger. Given that the general direction that issue is going is to light-dismiss on loss of focus, I think we can close this issue. I'll add a comment there, pointing out the specific question of embedded documents.

@mfreed7 mfreed7 closed this as completed Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
popover The Popover API stale
Projects
None yet
Development

No branches or pull requests

2 participants