Skip to content

Conversation

@texodus
Copy link
Member

@texodus texodus commented Nov 30, 2025

This PR fixes a scroll issue when non-zero padding is applied to the regular-table element. It is based on #241 (thanks @timkpaine !) but memoizes the potentially expensive clientHeight read and fixes scrollToCell reciprocal calculation.

In general, its best to avoid applying layout CSS to regular-table itself as it may interfere with the library's geometry calculation. In the case of padding, there were a few issues to resolve:

  • The visible area of the table is now smaller than the scrollable area which doesn't really have a regular DOM corollary (note the scrollable area and scrollbar in green, viewable area in red). This must be corrected everywhere we calculate virtual scrollable area or viewport size:
    Screenshot 2025-11-30 at 10 52 37 AM
  • In addition to padding and margin, the viewable area must accomodate for the scrollbar gutter size when the viewable area and the scrollable area are the same (or within the margin of the gutter size).

@texodus texodus added the bug Concrete, reproducible bugs label Nov 30, 2025
@texodus texodus merged commit 8572f3a into master Nov 30, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Concrete, reproducible bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants