You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Selection highlight disappears or overlaps frozen cells when scrolling #39
Thanks for maintaining react-xlsx! We use it to preview workbooks and would like to contribute a focused fix for selection rendering with frozen panes.
Reproduction
Reproduced in the upstream playground on main at 434e5a6 (package version 0.17.2), using the default canvas renderer. The attached synthetic workbook contains only cell-address labels, with the first two rows and columns frozen.
Open the attached workbook in the playground (Insert → Open).
Select B2, then scroll vertically. B2 remains visible in the frozen corner, but its selection outline disappears. The name box still shows B2.
Scroll back to the top. Select B2:E7 by dragging, then scroll down slightly. The range highlight moves over frozen cells that are outside the selected range instead of remaining aligned with the visible selected cells.
Expected behavior
Frozen portions of a selection should remain anchored to their cells. Scrolling portions should move with the worksheet and be clipped at frozen-pane boundaries. This should also work for a range crossing both boundaries.
Why this matters
The outline is how users identify which data they selected. Losing it, or painting it over different cells, makes workbook inspection confusing and can make the wrong data appear selected.
Investigation / proposed contribution
Worksheet rendering already separates frozen and scrolling panes. The selection uses a single absolute overlay, so it does not follow the same pane positioning and clipping. We have a downstream workaround for 0.15.0. The source-level fix against current main is available in #40.
Evidence
The recordings focus on one interaction: select B2, then gradually scroll down. Watch the blue outline around B2; the cell remains visible in the frozen corner and the name box continues to show B2.
The first recording shows the bug on unmodified upstream. The second compares upstream (top) with the local source fix (bottom), using the same workbook and actions. Captions explain each step. The recordings demonstrate the single-cell B2 case. Manual visual checks also covered B2:E7, spanning frozen and scrolling cells across both boundaries.
The PR reuses the existing pane bounds and viewport transforms for canvas selection outlines and fill handles. The captioned recordings above compare unmodified upstream with this fix. Type checking, all 30 existing tests, and the package build passed.
Activity
JueyingLi commentedon Oct 14, 2026
The source fix is now in PR #40: #40.
Branch: JueyingLi/react-xlsx:fix/frozen-selection.
The PR reuses the existing pane bounds and viewport transforms for canvas selection outlines and fill handles. The captioned recordings above compare unmodified upstream with this fix. Type checking, all 30 existing tests, and the package build passed.
andrewlu0 commentedon Oct 19, 2026
thank you, just merged, will cut a patch release