Skip to content

fix(fuselage): Select's hidden select causing a layout shift - #1980

Merged
tassoevan merged 2 commits into
mainfrom
fix/accordion-panel-scroll-height
May 22, 2026
Merged

tassoevan merged 2 commits into
mainfrom
fix/accordion-panel-scroll-height

Conversation

@ricardogarim

@ricardogarim ricardogarim commented May 20, 2026 •

Copy link
Copy Markdown
Member

Proposed changes (including videos or screenshots)

Wrap HiddenSelect in a positioned Box inside SelectAria, so its absolute positioning no longer escapes to upstream ancestors and inflates their scroll height.

Why

react-aria's HiddenSelect is a 1×1 px position: absolute element (used for browser autofill and native form submission). In #1939 it was moved out of SelectTrigger to fix an a11y violation, leaving it with no nearby positioned ancestor. Its position now resolves against the next positioned element upstream — typically the OverlayScrollbars viewport hundreds of pixels above — anchoring the 1×1 element deep inside that viewport's coordinate space and inflating its scrollHeight.

On Rocket.Chat admin pages (Accounts, OAuth, Layout), with many Selects inside collapsed Accordion panels, this surfaces as ~2100px of blank scroll below the content.

Fix

Wrap HiddenSelect in <Box position='relative' size={0}> inside SelectAria. SelectTrigger and Popover are untouched.

Steps to reproduce

  1. Log in as admin
  2. Open /admin/settings/Accounts
  3. Scroll to the end

Actual: ~2100px blank area below the last setting.
Expected: Scroll ends at the last item.

Issue(s)

CORE-2202. Regression from #1939.

@changeset-bot

changeset-bot Bot commented May 20, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: ebbe6ba

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@rocket.chat/fuselage Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@CLAassistant

CLAassistant commented May 20, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@RocketChat RocketChat deleted a comment from CLAassistant May 20, 2026
@ricardogarim
ricardogarim requested a review from tassoevan May 20, 2026 19:48
@ricardogarim
ricardogarim marked this pull request as ready for review May 20, 2026 19:49
@ricardogarim ricardogarim changed the title fix: accordion panel leaks scroll height from absolutely-positioned c… fix: accordion panel scroll height overflow May 20, 2026
@ricardogarim
ricardogarim force-pushed the fix/accordion-panel-scroll-height branch from cfec21c to 2761eb3 Compare May 22, 2026 11:47
@ricardogarim
ricardogarim force-pushed the fix/accordion-panel-scroll-height branch from 2761eb3 to ebbe6ba Compare May 22, 2026 15:34
@tassoevan
tassoevan force-pushed the fix/accordion-panel-scroll-height branch from 79a3de0 to ebbe6ba Compare May 22, 2026 20:27
@tassoevan tassoevan changed the title fix: accordion panel scroll height overflow fix: Select's hidden select causing a layout shift May 22, 2026
@tassoevan tassoevan changed the title fix: Select's hidden select causing a layout shift fix(fuselage): Select's hidden select causing a layout shift May 22, 2026
@tassoevan
tassoevan merged commit faa9feb into main May 22, 2026
10 checks passed
@tassoevan
tassoevan deleted the fix/accordion-panel-scroll-height branch May 22, 2026 20:33
@github-actions github-actions Bot mentioned this pull request May 13, 2026
'@rocket.chat/fuselage': patch
---

Fixed `Select` inflating ancestor scrollHeight inside non-positioned containers (collapsed `Accordion`, `Modal`, `Field`, etc.). Regression from 0.77.0 (#1939).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

changeset content should be the same as the PR title 😢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants