8000 Instant preview misplacement with tabs above · Issue #6735 · squidfunk/mkdocs-material · GitHub
[go: up one dir, main page]

Skip to content

Instant preview misplacement with tabs above #6735

@pawamoy

Description

@pawamoy

Context

Reported here first: #6704 (comment).

Bug description

Instant previews enabled globally with navigation.instant.preview.

When there are tabs above a previewable link, the preview windows can be misplaced: it seems the preview windows position are calculated once, when the page loads. If I change tabs above previewable links, and these tabs have different heights, then all previewable links after these tabs have misplaced preview windows. If I reload the page, staying on the second tab, positions are recalculated correctly. Well, these are assumptions, you'll know better what's really happening 🙂

Related links

Reproduction

9.5.7+insiders.4.52.1-instant-preview-misplacement.zip

Steps to reproduce

  • Serve the given reproduction and go to the home page.
  • Assert both previewable links have correct preview window positions.
  • Now change to second tab in the "Tabs before" section.
  • Assert that first link preview is still correct, but second link preview isn't. Increase or reduce space below second link (by scrolling) to see both behaviors (when there's enough space below the link to show the preview window, or not).

Browser

Firefox

Before submitting

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue reports a bugresolvedIssue is resolved, yet unreleased if open

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0