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

Track top layer order #95

Open
sanajaved7 opened this issue Mar 28, 2023 · 3 comments
Open

Track top layer order #95

sanajaved7 opened this issue Mar 28, 2023 · 3 comments

Comments

@sanajaved7
Copy link
Contributor

As of #90, the polyfill supports anchoring of top layer elements but we want to also keep track of the order of top layer elements to ensure a top layer target element cannot anchor to a succeeding top layer anchor, like this WPT shows.

Some additional context and background:

  • While some browsers are beginning to roll out a way to inspect the top layer, as of now there is no programmatic way to access the order of the elements in the top layer so we need to track and maintain this within the polyfill. There is an open request for an API here.
  • To keep track of this order, we need to listen for events like showPopover, showDialog, close(), and clicks to dismiss popovers as well.
  • As the order of the top layer elements change, we will need to revalidate to prevent cases like WPT anchor-position-top-layer-006. This is related to the feature requested in applying the polyfill to dynamic elements #91 because dynamically adding and removing anchors and/or targets are not yet supported.
@jamesnw
Copy link
Contributor

jamesnw commented May 17, 2024

@jgerigmeyer This appears to be related to #103 - is it a duplicate, or does it need to be tracked separately?

@jgerigmeyer
Copy link
Member

@jamesnw I think this might be irrelevant given the changes in #103? I'm not entirely sure without digging into the updated WPTs.

@jamesnw
Copy link
Contributor

jamesnw commented May 17, 2024

Makes sense- let's keep it open, and revisit once we get to the potentially related task.

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

3 participants