Skip to content

Conversation

thevaadinman
Copy link
Contributor

@thevaadinman thevaadinman commented Oct 15, 2025

Description

Spreadsheet does not handle freeze panes correctly. In this case, SpreadsheetFactory.loadFreezePane(Spreadsheet) does not check if paneInformation.getVerticalSplitPosition() or paneInformation.getHorizontalSplitPosition() returns 0 before attempting to hide columns according to the saved scroll state.

By adding a check for a correct return value from paneInformation, this change fixes a situation where a document with a freeze pane that was scrolled before being saved would load incorrectly, resulting in the user being unable to scroll to the beginning of the document, and the rendering being corrupted.

Unfortunately, Spreadsheet does not provide a sane API for restoring the original scroll position, which is something that both MS Excel and LibreOffice Calc do. Adding this functionality is out-of-scope for this PR.

Fixes #8136.

Type of change

  • Bugfix
  • Feature

Checklist

  • I have read the contribution guide: https://vaadin.com/docs/latest/contributing/overview
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change.
  • I have performed self-review and corrected misspellings.
  • I have not completed some of the steps above and my pull request can be closed immediately.

Additional for Feature type of change

  • Enhancement / new feature was discussed in a corresponding GitHub issue and Acceptance Criteria were created.

Copy link

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.

Spreadsheet's scrolling gets confused when loading a scrolled document with frozen rows/columns

1 participant