Skip to content

fix(web-components): prevent dialog content shift on overflow - #4650

Open
sylvesterkaczmarek wants to merge 2 commits into
mi6:developfrom
sylvesterkaczmarek:fix/3350-dialog-scrollbar-gutter
Open

fix(web-components): prevent dialog content shift on overflow#4650
sylvesterkaczmarek wants to merge 2 commits into
mi6:developfrom
sylvesterkaczmarek:fix/3350-dialog-scrollbar-gutter

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Summary of the changes

Fixes IcDialog content shifting horizontally when the content area becomes vertically scrollable.

The dialog content uses overflow-y: auto, so when a vertical scrollbar appears the available content width can shrink by the scrollbar width. This is visible when dynamic content expands, for example accordions or open selects.

This change reserves the vertical scrollbar gutter on the dialog content area using scrollbar-gutter: stable, keeping the content box width stable before and after overflow appears.

No public API or visual design changes.

Related issue

Closes #3350

Testing

  • Adds a React Cypress regression that measures the content-area width before overflow.
  • Dynamically adds content until vertical overflow is present.
  • Verifies the content-area width remains unchanged.
  • Production change is one CSS declaration.
  • Production and React regression changes are split by package scope.
  • Branch is based directly on develop.

Full upstream CI will run when the PR is opened.

Comment thread packages/react/src/component-tests/IcDialog/IcDialogScrollbarGutter.cy.tsx Outdated
@GCHQ-Developer-530
GCHQ-Developer-530 force-pushed the fix/3350-dialog-scrollbar-gutter branch from 87d2469 to adc33e3 Compare August 28, 2026 15:24
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ GCHQ-Developer-530
❌ Sylvester Kaczmarek


Sylvester Kaczmarek seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

3 participants