You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Dialog/Drawer: lock scroll on the root element to prevent layout shift (#42545)
* Dialog/Drawer: lock scroll on the root element to prevent layout shift
Apply the dialog-open scroll-lock (overflow: hidden) to the root <html>
element instead of <body>, so it sits on the same element as
scrollbar-gutter: stable. Co-locating them keeps the gutter reserved
while the scrollbar is hidden, so the page no longer shifts (and the
::backdrop covers the gutter instead of leaving a white strip) when a
dialog or drawer opens. Fixes#39221, #39972, #40908, #40659.
* Bump bundlewatch size thresholds
Copy file name to clipboardExpand all lines: site/src/content/docs/guides/migration.mdx
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -177,7 +177,7 @@ Bootstrap 6 is a major release with many breaking changes to modernize our codeb
177
177
- Data key: `bs.modal`→`bs.dialog` (affects `Dialog.getInstance()` and `Dialog.getOrCreateInstance()`).
178
178
- CSS variables: `--modal-*`→`--dialog-*`.
179
179
- Backdrop: The `.modal-backdrop` DOM element and the legacy `util/backdrop` helper are gone — Dialog uses the native `::backdrop` pseudo-element with `backdrop-filter: blur()` support.
180
-
-Body scroll prevention: `.modal-open` on `<body>`→`.dialog-open` on the `<body>` element.
180
+
-Scroll prevention: `.modal-open` on `<body>`→`.dialog-open` on the root (`<html>`) element, so it pairs with `scrollbar-gutter: stable` and the page doesn't shift when a dialog opens.
181
181
- New variant classes: `.dialog-slide-up`, `.dialog-slide-down` (slide animations), `.dialog-instant` (no animation), `.dialog-static` (static backdrop bounce), `.dialog-nonmodal` (non-modal positioning), `.dialog-scrollable`.
182
182
- Non-modal support: Set `modal: false` or `data-bs-modal="false"` for non-modal dialogs.
183
183
- Dialog swapping: Triggers inside an open dialog can open a new dialog and close the current one automatically.
0 commit comments