Skip to content

fix: reset freeze pane split positions when switching sheets#9035

Open
DiegoCardoso wants to merge 1 commit intomainfrom
fix/spreadsheet-freeze-pane-bleed
Open

fix: reset freeze pane split positions when switching sheets#9035
DiegoCardoso wants to merge 1 commit intomainfrom
fix/spreadsheet-freeze-pane-bleed

Conversation

@DiegoCardoso
Copy link
Copy Markdown
Contributor

Summary

  • Fixes freeze pane state bleeding between sheets when switching tabs in Spreadsheet
  • When switching from a sheet with a freeze pane split to one without that split type, the previous sheet's split position was not reset to 0, causing it to persist visually
  • Root cause: commit a1963f9 guarded setHorizontalSplitPosition/setVerticalSplitPosition behind split-exists checks but the else branches never explicitly reset the positions to 0

Fixes #9006

Test plan

  • New unit tests in SpreadsheetFactoryTest verify all freeze pane combinations (both splits, only rows, only columns, none) and the sheet-switching bleed scenario
  • Rollback verification: 3 of 5 unit tests fail without the fix, pass with it
  • Existing regression tests (HiddenAndFrozenIT, LoadFileWithFrozenPaneScrolledIT, MergedCellFrozenIT) all pass

🤖 Generated with Claude Code

When switching between sheets, freeze pane split positions from the
previous sheet could bleed into the next sheet. This happened because
the else branches only handled scroll restoration but never explicitly
reset split positions to 0 when a sheet had no split in one direction.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

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.

[Spreadsheets] Freeze Panes on one sheet carry over to other sheets

1 participant