fix: prevent scrolling rows from bleeding into frozen trailing band - #1193
Open
annahaa874 wants to merge 2 commits into
Open
fix: prevent scrolling rows from bleeding into frozen trailing band#1193annahaa874 wants to merge 2 commits into
annahaa874 wants to merge 2 commits into
Conversation
`walkRowsInCol` does not clip scrolling rows at freezeY, so the last visible scrolling row's y-range crosses into the freeze band. Glide's normal flow relies on each column repainting the frozen row's fill after the scrolling walk to overwrite that overflow. With a wide `span` this short-circuits via `handledSpans` for every column after the first, leaving scrolling-row content visible inside the frozen span; per-column selection/highlight accents were also skipped for the same reason. Fall through with `skipContents=true` for sticky rows so each column repaints its own fill. Content stays drawn once by the initial span push. Non-frozen spans keep the short-circuit — they don't hit the overflow-into-freeze-band issue and rely on the wide-fill column for highlightRegions. Adds a regression test that fails without the fix.
annahaa874
force-pushed
the
fix/frozen-row-span-overflow
branch
from
July 3, 2026 11:02
662c6a8 to
1b69a25
Compare
Stop per-column repainting for spans in frozen trailing rows and restore single-pass span rendering. Clamp scrollable row walking and full redraw painting to the frozen-row boundary, with a sticky-span exception to avoid group-row seam darkening. Update tests for the new row count and span fill behavior.
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.
Problem
When a cell in a
freezeTrailingRowsrow usesspan, two visual bugs appear:Content bleed on horizontal scroll.
walkRowsInColdraws scrolling rows all the way to the canvas bottom — past the frozen boundary. The frozen row normally paints over that overflow, but a spanning cell only fills once (first column), so subsequent columns never overwrite the bleed.Partial highlight/selection. Same root cause — per-column accent (selection, highlight) is skipped by the span short-circuit, so only the first non-sticky column highlights.
Repro
freezeTrailingRows: 1(or higher)getCellContentreturns a cell withspan: [a, b]for the frozen rowFix
Three changes that prevent scrolling rows from entering the frozen band at all:
Clamp
walkRowsInColatfreezeY. The scrolling-row walk loop now stops atheight - freezeTrailingRowsHeightinstead ofheight. Scrolling rows never enter the frozen zone.Clip straddling rows. If a scrolling row's rendered rectangle still crosses
freezeY(sub-pixel rounding),ctx.clipit at the boundary during full redraws.Exempt sticky spans from the clip. Sticky columns are re-composited every frame. Clipping them would accumulate a visible seam. They don't need clipping because frozen trailing rows paint over them during the sticky pass.
Test
Regression test in
test/data-editor.test.tsx: renders a frozen trailing row with a spanning cell and assertsfillRectis called more than once at the frozen row's y. Fails onmain; passes with the fix. Full suite passes.Co-authored-by: Sassoun Derderian sassound2@gmail.com