Skip to content

[scroll area] Forced reflows / Layout trashing #3534

@oliviertassinari

Description

@oliviertassinari

Reproducible example

Since #2778, when there are multiple ScrollArea on screen (e.g., our docs pages), we force React to update the DOM to render each, so it means that each component needs to read the DOM. We have a cascade of forced reflows:

SCR-20251213-msts

https://693ae9e6a41ca30008471aaf--base-ui.netlify.app/react/components/select, from the before example of #3531

Current behavior

Expected behavior

Intuitively, I wouldn't expect flushSync to be needed in this context; it feels like this fix hides a deeper problem.

Base UI version

v1.0.0

Which browser are you using?

Chrome

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: scroll areaChanges related to the scroll area component.performancetype: enhancementIt’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions