pull/1967/head
konnorrogers 2024-04-11 13:36:18 -04:00
rodzic e95ad58437
commit b3ac469c34
2 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -1743,4 +1743,4 @@ The following pages demonstrate why this change was necessary.
## 2.0.0-beta.1
- Initial release
- Initial release

Wyświetl plik

@ -34,11 +34,11 @@ export function lockBodyScrolling(lockingEl: HTMLElement) {
/** Scrollbar width + body padding calculation can go away once Safari has scrollbar-gutter support. */
const scrollbarWidth = getScrollbarWidth() + getExistingBodyPadding(); // must be measured before the `sl-scroll-lock` class is applied
let scrollbarGutterProperty = getComputedStyle(document.documentElement).scrollbarGutter
let scrollbarGutterProperty = getComputedStyle(document.documentElement).scrollbarGutter;
// default is auto, unsupported browsers is "undefined"
if (!scrollbarGutterProperty || scrollbarGutterProperty === "auto") {
scrollbarGutterProperty = "stable"
if (!scrollbarGutterProperty || scrollbarGutterProperty === 'auto') {
scrollbarGutterProperty = 'stable';
}
if (scrollbarWidth <= 0) {