Skip to content

fix(render): clamp vDomTopPad to zero when removing top rows - #4934

Draft
lukecotter wants to merge 1 commit into
tabulator-tables:masterfrom
lukecotter:fix/render-remove-toppad-clamp
Draft

fix(render): clamp vDomTopPad to zero when removing top rows#4934
lukecotter wants to merge 1 commit into
tabulator-tables:masterfrom
lukecotter:fix/render-remove-toppad-clamp

Conversation

@lukecotter

Copy link
Copy Markdown
Contributor

Problem

In _removeTopRow, accumulated actual row heights can push vDomTopPad slightly
negative. That sets a negative paddingTop and lets rendered content drift above the
viewport.

Fix

Clamp vDomTopPad to zero after the adjustment. One line.

A note on test coverage

An e2e test written for this passed with and without the fix, so it was deleted
rather than kept as misleading coverage. The failure is a sub-pixel drift that the
existing harness cannot resolve; the reasoning is in the diff comment instead.

Performance

Neutral. 500k rows, K=5, medians:

Metric Before After
initial render (ms) 97.6 102.0
initial render, variable heights (ms) 105.6 102.9
fling churn, uniform 14205 14205
fling churn, variable 3935 3935

In _removeTopRow, accumulated actual row heights can push vDomTopPad slightly negative, which sets a negative paddingTop and lets rendered content drift above the viewport. Clamp to zero after the adjustment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant