Skip to content

Window: document headers misalign when resizingEnabled is true in DocumentHandler #1845

Description

@Sunix71

Bug description

When resizingEnabled: true is set in the DocumentHandler plugin options, document
headers jump/misalign when a document is opened and scrolled to a specific heading
(via search results or internal document links that use a headerIdentifier).

Opening a document at the top (e.g. via the panel menu) does NOT trigger the issue.
The problem only occurs when the document viewer scrolls to a specific heading.

Setting resizingEnabled: false resolves the issue completely.

Steps to reproduce

  1. Configure the DocumentHandler plugin with "resizingEnabled": true in the map config.
  2. Search for a heading inside a document and click the search result.
  3. Expected: Document opens and scrolls correctly to the heading.
  4. Actual: The heading jumps upward and appears misaligned. Persists until page reload.

Opening the same document via the panel menu (no specific heading) works fine.

Root cause (suspected)

The scroll-to-header mechanism (triggered by headerIdentifier) interacts badly
with react-rnd's resize layout when resizingEnabled: true. The window or its
content container likely recalculates position/height during the scroll, causing
the visible content to jump.

Affected file

apps/client/src/components/Window.jsx

Workaround

Set "resizingEnabled": false in the DocumentHandler plugin options.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions