Dropdowns don't scroll with the page
Describe the bug
A cds-dropdown seems to stay pinned to it's position on the page instead of scrolling with it's anchor element if the page scrolls.
How to reproduce
https://stackblitz.com/edit/clarity-dark-theme-clr13-cds6-nlxpe6?file=src%2Fapp%2Fapp.component.html,src%2Fapp%2Fapp.component.ts
Steps to reproduce the behavior:
- Click on the
iicon and scroll the page when the NG signpost opens. Notice how it scrolls with the anchor element - Click on the button to open the cds-dropdown.
- Notice how the dropdown stays fixed while it's anchor scrolls away with the page.
Expected behavior
The dropdown should scroll with the anchor
Versions
Clarity project:
- [x] Clarity Core
- [ ] Clarity Angular/UI
Clarity version:
- [ ] v5.x
- [x] v6.x
This seems to be related to the position: fixed set on the host element: https://github.com/vmware-clarity/core/blob/main/projects/core/src/internal-components/popup/popup.element.scss#L34 This is the same logic and css used for overlays like the modal overlay, so it looks like its all intended to be used like an overlay.