Skip to content

fix(core): probe positioned-child limit in getMaxSupportedCssHeight#2645

Merged
ghiscoding merged 1 commit into
masterfrom
bugfix/max-css-height-position-probe
Jul 13, 2026
Merged

fix(core): probe positioned-child limit in getMaxSupportedCssHeight#2645
ghiscoding merged 1 commit into
masterfrom
bugfix/max-css-height-position-probe

Conversation

@ghiscoding

Copy link
Copy Markdown
Owner

Apply fix from 6pac repo's

Problem

getMaxSupportedCssHeight() probes the browser's height limit by doubling a div's height and reading it back. On Chromium that read-back survives to 32,000,000px — but Blink separately clamps absolutely-positioned layout at 16,777,214px (2²⁴−2). Since grid rows are absolutely-positioned children of the canvas, any grid whose canvas exceeds ~16.7M px silently misplaces every row past that boundary.

Reproduced on a 1.5M-row grid at the default 25px row height (canvas capped at the probed 32M px):

row 1,499,964:  style.top: 26,703,000px   →   offsetTop: 16,777,214

Every row between ~16.7M and 32M canvas px stacks up at the clamp. At 25px rows this hits any grid beyond ~671k rows; the virtual-paging machinery that exists precisely to avoid the browser limit never engages because the probe reports a limit the browser can't actually position at.

Fix

Probe what the grid actually depends on: alongside the height read-back, position a 1px marker child at top: test - 1 and require marker.offsetTop === test - 1. The probe stops at the first height where either check fails.

On Blink the doubling sequence (1M → 2M → … → 16M → 32M) now fails at the 32M step and returns 16,000,000, safely inside the real limit, so the existing page-switching machinery simply engages earlier. Firefox is unaffected (ffMaxSupportedCssHeight caps the probe at 6M, below the clamp). The options.maxSupportedCssHeight / ffMaxSupportedCssHeight escape hatches are unchanged.

Verification

  • Chromium now probes 16,000,000 (was 32,000,000).
  • The 1.5M-row repro above renders correctly: for rendered rows at every scroll position, offsetTop equals the requested style.top (paging keeps in-canvas positions under 16M).
  • Full Cypress suite passes (grids in the examples are far below the threshold, so no behaviour change for them).

🤖 Generated with Claude Code

@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.0%. Comparing base (a944424) to head (7a919ff).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2645   +/-   ##
=======================================
  Coverage   100.0%   100.0%           
=======================================
  Files         200      200           
  Lines       25317    25320    +3     
  Branches     8951     8951           
=======================================
+ Hits        25317    25320    +3     
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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 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 13, 2026

Copy link
Copy Markdown
angular-slickgrid

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

aurelia-slickgrid

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

slickgrid-react

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

slickgrid-vue

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

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

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

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

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

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

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

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

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

@slickgrid-universal/binding

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

@slickgrid-universal/common

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

@slickgrid-universal/composite-editor-component

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

@slickgrid-universal/custom-footer-component

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

@slickgrid-universal/custom-tooltip-plugin

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

@slickgrid-universal/empty-warning-component

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

@slickgrid-universal/event-pub-sub

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

@slickgrid-universal/excel-export

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

@slickgrid-universal/graphql

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

@slickgrid-universal/odata

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

@slickgrid-universal/pagination-component

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

@slickgrid-universal/pdf-export

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

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

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

@slickgrid-universal/rxjs-observable

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

@slickgrid-universal/sql

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

@slickgrid-universal/text-export

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

@slickgrid-universal/utils

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

@slickgrid-universal/vanilla-bundle

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

@slickgrid-universal/vanilla-force-bundle

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

@slickgrid-universal/web-mcp

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

commit: 7a919ff

@ghiscoding
ghiscoding merged commit c03bf1f into master Jul 13, 2026
13 checks passed
@ghiscoding
ghiscoding deleted the bugfix/max-css-height-position-probe branch July 13, 2026 15:10
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