Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Popover: use fallback anchor s parent instead of fallback anchor itself
  • Loading branch information
ciampo committed Aug 9, 2022
commit e57541f491329f99535586649f6578e003edbd34
4 changes: 3 additions & 1 deletion packages/components/src/popover/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,9 @@ const Popover = (
},
};
} else if ( anchorRefFallback.current ) {
resultingReferenceRef = anchorRefFallback.current;
// If not explicit ref if passed via props, fallback to
// anchoring to the popover's parent node.
resultingReferenceRef = anchorRefFallback.current.parentNode;
}

if ( ! resultingReferenceRef ) {
Expand Down