bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

Fix: Opening a modal with scrollbar-gutter: stable shifts the page content and shows white (non grey-overlayed) gutters

Open ac-mmi opened this issue 6 months ago • 0 comments

This pull request addresses https://github.com/twbs/bootstrap/issues/40659 issue.

I have updated the modal SCSS file to include a fix that targets the content shift issue when the scrollbar-gutter: stable both-edges property is used. Specifically:

  • I added a @supports rule that checks if the browser supports scrollbar-gutter: stable both-edges.
  • When the modal is open (.modal-open class is applied to the body), the additional padding-right adjustment is removed, preventing the content from shifting unexpectedly.

This fix ensures that the modal behavior remains consistent and that no unnecessary padding is applied when scrollbar-gutter: stable both-edges is present.

Closes https://github.com/twbs/bootstrap/issues/40659

ac-mmi avatar Sep 03 '24 09:09 ac-mmi