vmware-clarity / core

Clarity is a scalable, accessible, customizable, open-source design system built with web components. Works with any JavaScript framework, created for enterprises, and designed to be inclusive.
https://clarity.design
MIT License
161 stars 42 forks source link

```cds-dropdown``` should scroll with parent viewport #271

Open squidjam opened 10 months ago

squidjam commented 10 months ago

Describe the bug

cds-dropdown seems to be fixed in the first area where it shows, rather than scrolling with the anchor or the surrounding viewport.

How to reproduce

Just try it in the documentation, you'll see it

Steps to reproduce the behavior:

  1. Create a big enough container where the anchor can be scrolled up/down (height: 100rem ?)
  2. Click on button to open dropdown
  3. Dropdown appears
  4. Scroll
  5. See error

Expected behavior

cds-dropdown contents should scroll alongside the anchor element or the viewport containing it

Versions

Clarity project:

Clarity version:

Framework:

Framework version:

Device:

Additional notes

Submitted this as a Discussion item, but no response. Now that the component is out, I prefer to submit a bug report.

squidjam commented 2 months ago

plink