Skip to content

Commit f25896b

Browse files
SteveSandersonMSMackinnonBuck
authored andcommitted
Apply overflow anchor fix to document element too
1 parent 38717a2 commit f25896b

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/Components/Web.JS/dist/Release/blazor.server.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Components/Web.JS/dist/Release/blazor.webassembly.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Components/Web.JS/src/Virtualize.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@ function init(dotNetHelper: any, spacerBefore: HTMLElement, spacerAfter: HTMLEle
2424
// would update the scroll position to compensate. Then the spacer would remain visible and we'd keep on
2525
// trying to resize it.
2626
const scrollContainer = findClosestScrollContainer(spacerBefore);
27-
if (scrollContainer) {
28-
scrollContainer.style.overflowAnchor = 'none';
29-
}
27+
(scrollContainer || document.documentElement).style.overflowAnchor = 'none';
3028

3129
const intersectionObserver = new IntersectionObserver(intersectionCallback, {
3230
root: scrollContainer,

0 commit comments

Comments
 (0)