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
Dropdown: use wrapper as the popover anchor, instead of the toggle
  • Loading branch information
ciampo committed Aug 19, 2022
commit 2a04ef54ba2b9bc02d6bbfd69561798958b7aa43
6 changes: 1 addition & 5 deletions packages/components/src/dropdown/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,7 @@ export default function Dropdown( props ) {
// This value is used to ensure that the dropdowns
// align with the editor header by default.
offset={ 13 }
anchorRef={
! hasAnchorRef
? containerRef?.current?.firstChild // Anchor to the rendered toggle.
: undefined
}
Comment on lines -111 to -115
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the main change that introduces the fix

anchorRef={ ! hasAnchorRef ? containerRef : undefined }
{ ...popoverProps }
className={ classnames(
'components-dropdown__content',
Expand Down