Repository navigation
Conversation
A Task List with 100 or more rows renders through VirtualScroller, which took the nearest ancestor with overflow auto or scroll as the list's scroll container. In a Base embedded in a note that is Obsidian's .bases-view: it sets overflow-x: auto there, so overflow-y computes to auto too, yet the element grows with its content and the note scrolls it. The scroller measured that element, rendered the rows of its first window, and redrew only when the list itself was scrolled; scrolling the note did nothing. The visible range is now the part of the container that is on screen: the viewport clipped by every ancestor that clips (skipping elements with display: contents, which have no box, such as a multi-column callout's content). A capturing scroll listener on the document and a resize listener redraw it. The container reserves the list's full height, so the note can scroll to rows not rendered yet, and the height estimate is skipped while the container has no width and then follows the measured rows. Containers with no layout keep the old scrollTop path.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
A Task List view with 100 or more rows, embedded in a note (
![[tasks.base#View]]), renders only its first rows. The rest stay blank while the note is scrolled, and appear only after scrolling with the mouse over the list itself. Seen on 4.14.0 and currentmain, Obsidian 1.15.0, Windows 11, Live Preview, with the embed inside a callout and inside a multi-column callout.Cause
VirtualScrollertakes the nearest ancestor whose computedoverflow-yisautoorscrollas the list's scroll container. In an embedded Base that is Obsidian's.bases-view, which getsoverflow-x: autoin notes, so itsoverflow-ycomputes toautoas well. That element is not height-bounded: it grows with its content, and the note's.cm-scrollerscrolls it. So the scroller sized its window from that element, rendered the first rows, and redrew only on scroll events from.bases-viewitself, never from the note.Measured in the affected embed (227 rows), the ancestor chain was:
.bases-view(auto) →.bases-embed(hidden) →.callout-content(auto) →.callout(hidden) →.callout-content(auto,display: contents, 0×0 rect) →.callout→.cm-embed-block→.cm-scroller(auto, the real scroller).Fix
In
VirtualScroller:overflow-yclips. Elements withdisplay: contentshave no box and are skipped; the multi-column callout's content is one, with a 0×0 rect and a computedoverflow-y: auto.scrolllistener on the document (scroll events do not bubble) and aresizelistener redraw it, so scrolling the note updates the rows.min-height, the spacer's height), since the spacer is absolutely positioned and gives an unbounded ancestor no height.scrollToppath.Tests
tests/unit/utils/VirtualScroller.test.tsfor an embedded list scrolled by its note: the first window, a note scroll, adisplay: contentsancestor, and the reserved height. Three failed onmainbefore the change; thedisplay: contentsone fails without that check.npm run lint:tsfor the file,tsc --noEmitandnpm run buildpass. Six unit suites fail on this machine (Windows) with and without the change: the same suites, unrelated.🤖 Generated with Claude Code