-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Shadow DOM support for ariaHideOutside
#6160
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
base: main
Are you sure you want to change the base?
Shadow DOM support for ariaHideOutside
#6160
Conversation
…rt' into ariaHideOutside-shadow-dom-support
8cb1a5d
to
3013156
Compare
a79adcf
to
3013156
Compare
# Conflicts: # packages/@react-aria/overlays/test/ariaHideOutside.test.js
… the same shadow root as a parent.
const shadowRoots = findShadowRoots(targets); | ||
|
||
if (shadowRoots.length > 0) { | ||
const targetsByShadowRoot = new Map<ShadowRoot, Element[]>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function ariaHideOutside
already accepts a root
element. Can we make this generic so that any element can be treated as root and not just the document.body
or shadow root ? If an element passed as root
is inside shadow root, even that should work. Does this make sense ?
This means that all the hooks using this function should also accept a custom root and should pass this information to this element.
Closes #6133
Changes
✅ Pull Request Checklist:
📝 Test Instructions:
🧢 Your Project:
PSPDFKit -