Skip to content

fix: layout shift in s2 modal docs#9956

Merged
snowystinger merged 1 commit into
adobe:mainfrom
nwidynski:fix-sheet-modal
Apr 22, 2026
Merged

fix: layout shift in s2 modal docs#9956
snowystinger merged 1 commit into
adobe:mainfrom
nwidynski:fix-sheet-modal

Conversation

@nwidynski
Copy link
Copy Markdown
Contributor

@nwidynski nwidynski commented Apr 21, 2026

Fixes layout shift in https://react-aria.adobe.com/Modal#sheet, by preventing overflow on the overlay itself. The overflow is caused by the modal transformation adding a horizontal scrollbar, which then in turn causes a vertical scrollbar on the root element, causing the layout to shift horizontally. Also adds a story so the gutter addition can be regression tested in the future.

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

@github-actions github-actions Bot added the RAC label Apr 21, 2026
Copy link
Copy Markdown
Member

@snowystinger snowystinger left a comment

Choose a reason for hiding this comment

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

lgtm, thanks for fixing that

@snowystinger snowystinger added this pull request to the merge queue Apr 22, 2026
Merged via the queue into adobe:main with commit e3913ba Apr 22, 2026
28 checks passed
@nwidynski nwidynski deleted the fix-sheet-modal branch April 22, 2026 15:38
@yihuiliao yihuiliao added the Modal label May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants