Skip to content

Commit c91bb8f

Browse files
authored
fix: Replaces the logical scroll padding with physical (#3706)
1 parent 23ed0c7 commit c91bb8f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/app-layout/__tests__/main.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ describeEachAppLayout({ themes: ['classic', 'refresh-toolbar'], sizes: ['desktop
129129
// Note: The toolbar height in jsdom environment is calculated as `0`.
130130
// For this reason both `refresh` and `refresh-toolbar` only consider the height of `#h` element which is `40px`.
131131
// We have covered this case with real values in integration tests.
132-
expect(document.scrollingElement).toHaveStyle('scroll-padding-block-start: 40px');
132+
expect(document.scrollingElement).toHaveStyle('scroll-padding-top: 40px');
133133
});
134134

135135
test('should use alternative header and footer selector', async () => {

src/app-layout/utils/use-global-scroll-padding.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export function useGlobalScrollPadding(headerHeight: number) {
88
useEffect(() => {
99
const scrollingElement = document.scrollingElement;
1010
if (scrollingElement instanceof HTMLElement) {
11-
scrollingElement.style.scrollPaddingBlockStart = `${headerHeight}px`;
11+
scrollingElement.style.scrollPaddingTop = `${headerHeight}px`;
1212
}
1313
}, [headerHeight]);
1414
}

0 commit comments

Comments
 (0)