]> git.ipfire.org Git - thirdparty/bootstrap.git/commit
Dialog/Drawer: lock scroll on the root element to prevent layout shift (#42545)
authorMark Otto <markd.otto@gmail.com>
Sat, 27 Jun 2026 03:15:07 +0000 (20:15 -0700)
committerGitHub <noreply@github.com>
Sat, 27 Jun 2026 03:15:07 +0000 (20:15 -0700)
commit4d08db13bf83bd3454497b0a5160d48775ea5cb9
tree27b9e3c55a9e02045beb74b082c87771a197c483
parentaa273699314cabde5b57f784dfa54c2f11c2610d
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
js/src/dialog-base.js
js/tests/unit/dialog.spec.js
js/tests/unit/drawer.spec.js
scss/_dialog.scss
site/src/content/docs/guides/migration.mdx