fix: ensure popover components anchor within the same local tree as the trigger - #8096
Draft
edleeks87 wants to merge 3 commits into
Draft
fix: ensure popover components anchor within the same local tree as the trigger#8096edleeks87 wants to merge 3 commits into
edleeks87 wants to merge 3 commits into
Conversation
tomdavies73
reviewed
Jul 24, 2026
| ) => { | ||
| const focusableElements: Element[] = Array.from( | ||
| document.querySelectorAll(defaultFocusableSelectors) || | ||
| /* istanbul ignore next */ [], |
Contributor
There was a problem hiding this comment.
question: do we need this empty array here and the Istanbul ignore?
I've pulled this down locally and removed it, and it appears to be okay from a TS perspective
tomdavies73
reviewed
Jul 24, 2026
tomdavies73
left a comment
Contributor
There was a problem hiding this comment.
Just one question from me, rest looks spot on 👍
ibutakova
reviewed
Jul 27, 2026
edleeks87
force-pushed
the
popover-landmarks
branch
from
July 31, 2026 13:27
f7f75ec to
81783ac
Compare
ibutakova
previously approved these changes
Jul 31, 2026
tomdavies73
previously approved these changes
Aug 3, 2026
edleeks87
force-pushed
the
popover-landmarks
branch
from
August 5, 2026 10:55
81783ac to
d2ab56e
Compare
edleeks87
marked this pull request as ready for review
August 7, 2026 08:37
edleeks87
marked this pull request as draft
August 7, 2026 08:40
…he trigger adds `portalTarget` to internal `Popover` component and ensures that `ActionPopover` and `PopoverContainer` utilise this to render the popover in the same local tree as the trigger/target element fix #7789
edleeks87
force-pushed
the
popover-landmarks
branch
from
August 7, 2026 10:14
de4a615 to
d7e5b45
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix #7789
Proposed behaviour
Adds
portalTargetto internalPopovercomponent and ensures thatActionPopoverandPopoverContainerutilise this to render the popover in the same local tree as the trigger/target element.If they're rendered in a modal they will anchor within that local tree, if not they will anchor to the portalTarget or to the body as a fallback
Current behaviour
Portal/Popover based components anchor to the document.body if they're not rendered in a modal
Checklist
d.tsfile added or updated if requiredQA
Additional context
Testing instructions