Skip to content

[Bug] After the table is sorted, the tooltip is misplaced #7453

@Xiaokang2022

Description

@Xiaokang2022

Context

  • OS: Windows 11 23H2
  • Browser: Edge 127.0.2651.74
  • mkdocs: 1.6.0
  • material: 9.5.31
  • Python: 3.12.0
  • tablesort: 5.3.0

Bug description

The way I added sorting to the table is what the documentation mentioned: https://squidfunk.github.io/mkdocs-material/reference/data-tables/#sortable-tables

When I use the following code to create a table, a bug occurs:

| Id  | Value           |
| --- | --------------- |
| 1   | A { title="A" } |
| 2   | B               |
| 3   | C               |
| 4   | D               |
| 5   | E               |

Before sorting, the position of this tooltip ("A") is correct:

image

But after sorting, this tooltip is misplaced:

image

It was only when I re-scrolled the page that it came back to the correct place.

Related links

Reproduction

9.5.31-bug.zip

Steps to reproduce

  1. Create a table with a tooltip
  2. Introduce JS for table sorting
  3. Sort the column that contains the tooltip
  4. Check whether the tooltip is misplaced

Browser

Edge

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