Skip to content

Select popover growth feedback loop #3789

@mitchlloyd

Description

@mitchlloyd

Bug report

Current behavior

Given:

  • The list of items in a select exceeds the viewport height
  • Positioner is using alignItemWithTrigger positioning
  • The popover that appears has an item selected so that the popover needs to grow when scrolling down

When I scroll down, the popover continues to grow 1px at a time in a loop until it reaches the max height.

popover-growth-bug.mov

Expected behavior

Popover grows when scrolling down and stops growing when scroll input stops.

Reproducible example

https://stackblitz.com/edit/43a3dxj7?file=src%2FApp.tsx,src%2Findex.module.css,demo.css,theme.css

This bug is very sensitive to spacing and is dependent on the viewport height. I can reliably reproduce this bug with these styles on my 15" mac book with Chrome maximized with the above example. That's a viewport height of 857.

Base UI version

For example v1.1.0

Which browser are you using?

Chrome 144.0.7559.60

Which OS are you using?

Mac OS

Which assistive tech are you using (if applicable)?

N/A

Additional context

Claude summary of issue exploring the code and debugging:

When the list is scrolled, the Positioner recalculates its position based on the new scroll state, which in turn triggers another scroll adjustment to maintain alignment - creating an infinite feedback loop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: selectChanges related to the select component.type: bugIt doesn't behave as expected.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions