Skip to content

fix: updateRowPositions leaves right-pane row fragments at stale positions - #2676

Open
ghiscoding wants to merge 1 commit into
masterfrom
fix/update-row-positions-fragments
Open

fix: updateRowPositions leaves right-pane row fragments at stale positions#2676
ghiscoding wants to merge 1 commit into
masterfrom
fix/update-row-positions-fragments

Conversation

@ghiscoding

Copy link
Copy Markdown
Owner

Port bug fix from 6pac/SlickGrid PR 6pac/SlickGrid#1257 into slickgrid-universal

The bug

updateRowPositions() — which runs whenever the virtual-scroll paging offset changes (scrollTo, huge datasets above the max supported CSS height) — repositioned only rowNode[0]:

const rowNode = this.rowsCache[rowNumber].rowNode![0];   // LEFT-pane fragment only
rowNode.style.top = `${this.getRowTop(rowNumber)}px`;

With frozen columns a row has one fragment per column pane. After a paging-offset jump, the left fragment moved to its new offset-relative top while the right-pane fragment kept its stale top — the two halves of the same row drift vertically apart across the freeze line by exactly one paging offset unit.

Secondary inconsistency fixed in the same line: it used bare getRowTop(), while the render path (appendRowHtml) places rows at getRowTop(row) - getFrozenRowOffset(row). The fix repositions every fragment with that same render-time formula, honoring rowTopOffsetRenderType per fragment.

Repro

frozenColumn: 0, 100,000 rows × 25px (virtual height 2.5M > the ~1M css cap, so paging engages with n=250 pages), then step scrollTo finely across a page boundary. Pre-fix, a rendered row's left fragment sits at e.g. top: 3976px while its right fragment sits at top: 10000px — a divergence of exactly cj (6024px, the paging offset unit).

Test

cypress/e2e/quirk-row-positions-fragments.cy.ts — the repro page's in-page self-check verifies paging is engaged (n > 1), walks scrollTo finely across up to 3 page boundaries, compares left/right fragment tops for every rendered data-row (hundreds of pairs), and asserts zero drift. Verified to fail on the pre-fix code (drift = one paging unit) and pass with the fix.

@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.0%. Comparing base (15d9833) to head (994495e).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2676   +/-   ##
=======================================
  Coverage   100.0%   100.0%           
=======================================
  Files         200      200           
  Lines       25452    25453    +1     
  Branches     8999     8999           
=======================================
+ Hits        25452    25453    +1     
Flag Coverage Δ
angular 100.0% <ø> (ø)
universal 100.0% <100.0%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pkg-pr-new

pkg-pr-new Bot commented Jul 29, 2026

Copy link
Copy Markdown
angular-slickgrid

npm i https://pkg.pr.new/angular-slickgrid@2676

aurelia-slickgrid

npm i https://pkg.pr.new/aurelia-slickgrid@2676

slickgrid-react

npm i https://pkg.pr.new/slickgrid-react@2676

slickgrid-vue

npm i https://pkg.pr.new/slickgrid-vue@2676

@slickgrid-universal/angular-row-detail-plugin

npm i https://pkg.pr.new/@slickgrid-universal/angular-row-detail-plugin@2676

@slickgrid-universal/aurelia-row-detail-plugin

npm i https://pkg.pr.new/@slickgrid-universal/aurelia-row-detail-plugin@2676

@slickgrid-universal/react-row-detail-plugin

npm i https://pkg.pr.new/@slickgrid-universal/react-row-detail-plugin@2676

@slickgrid-universal/vue-row-detail-plugin

npm i https://pkg.pr.new/@slickgrid-universal/vue-row-detail-plugin@2676

@slickgrid-universal/binding

npm i https://pkg.pr.new/@slickgrid-universal/binding@2676

@slickgrid-universal/common

npm i https://pkg.pr.new/@slickgrid-universal/common@2676

@slickgrid-universal/composite-editor-component

npm i https://pkg.pr.new/@slickgrid-universal/composite-editor-component@2676

@slickgrid-universal/custom-footer-component

npm i https://pkg.pr.new/@slickgrid-universal/custom-footer-component@2676

@slickgrid-universal/custom-tooltip-plugin

npm i https://pkg.pr.new/@slickgrid-universal/custom-tooltip-plugin@2676

@slickgrid-universal/empty-warning-component

npm i https://pkg.pr.new/@slickgrid-universal/empty-warning-component@2676

@slickgrid-universal/event-pub-sub

npm i https://pkg.pr.new/@slickgrid-universal/event-pub-sub@2676

@slickgrid-universal/excel-export

npm i https://pkg.pr.new/@slickgrid-universal/excel-export@2676

@slickgrid-universal/graphql

npm i https://pkg.pr.new/@slickgrid-universal/graphql@2676

@slickgrid-universal/odata

npm i https://pkg.pr.new/@slickgrid-universal/odata@2676

@slickgrid-universal/pagination-component

npm i https://pkg.pr.new/@slickgrid-universal/pagination-component@2676

@slickgrid-universal/pdf-export

npm i https://pkg.pr.new/@slickgrid-universal/pdf-export@2676

@slickgrid-universal/row-detail-view-plugin

npm i https://pkg.pr.new/@slickgrid-universal/row-detail-view-plugin@2676

@slickgrid-universal/rxjs-observable

npm i https://pkg.pr.new/@slickgrid-universal/rxjs-observable@2676

@slickgrid-universal/sql

npm i https://pkg.pr.new/@slickgrid-universal/sql@2676

@slickgrid-universal/text-export

npm i https://pkg.pr.new/@slickgrid-universal/text-export@2676

@slickgrid-universal/utils

npm i https://pkg.pr.new/@slickgrid-universal/utils@2676

@slickgrid-universal/vanilla-bundle

npm i https://pkg.pr.new/@slickgrid-universal/vanilla-bundle@2676

@slickgrid-universal/vanilla-force-bundle

npm i https://pkg.pr.new/@slickgrid-universal/vanilla-force-bundle@2676

@slickgrid-universal/web-mcp

npm i https://pkg.pr.new/@slickgrid-universal/web-mcp@2676

commit: 994495e

@ghiscoding ghiscoding added the AI label Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant