Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

long unbreakable headings break mobile table-of-contents view #6344

Closed
4 tasks done
thesuperzapper opened this issue Nov 15, 2023 · 5 comments · Fixed by #6351
Closed
4 tasks done

long unbreakable headings break mobile table-of-contents view #6344

thesuperzapper opened this issue Nov 15, 2023 · 5 comments · Fixed by #6351
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@thesuperzapper
Copy link

Context

No response

Bug description

If you have a very long unbreakable heading in a page, the table of contents view (in the mobile sidebar) will not wrap it, and it will be scrollable off-screen.

I am not sure what the most desirable behavior here is, e.g. force wrapping (even in the middle of words), or making an ellipsis, or something else.

Screenshot 2023-11-15 at 15 13 29

Related links

Reproduction

9.4.8-long-headings-break-toc.zip

Steps to reproduce

  1. Create a very long heading in a page (which is not breakable with spaces, dashes, etc)
  2. Open page on mobile
  3. View sidebar table of contents
  4. Notice that the heading link goes off page in a way which is not scrollable on mobile that

Browser

No response

Before submitting

@alexvoss

This comment was marked as outdated.

@alexvoss
Copy link
Sponsor Collaborator

Coming back to this, I should have looked at your reproduction first. I do not get the behaviour you describe when I use the Insider version of Material but when I use the public version I get the same result as you do. This does seem to be an unintended divergence between the two versions to me.

This is with insiders:
image

@alexvoss alexvoss added the bug Issue reports a bug label Nov 17, 2023
@alexvoss
Copy link
Sponsor Collaborator

I think I have spotted where the problem lies. In the toc-item partial in the public version, there is no span that attaches the .md-ellipsis class. That is present in the Insiders version. Will do a PR.

@squidfunk
Copy link
Owner

Keeping open, until released.

@squidfunk squidfunk reopened this Nov 17, 2023
@squidfunk squidfunk added the resolved Issue is resolved, yet unreleased if open label Nov 17, 2023
@squidfunk
Copy link
Owner

Released as part of 9.4.9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants