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

Sometimes toc.follow doesn't move last entries into view #4960

Closed
4 tasks done
reregaga opened this issue Jan 31, 2023 · 2 comments
Closed
4 tasks done

Sometimes toc.follow doesn't move last entries into view #4960

reregaga opened this issue Jan 31, 2023 · 2 comments
Labels
bug Issue reports a bug resolved Issue is resolved, yet unreleased if open

Comments

@reregaga
Copy link

Context

site_name: My Docs

nav:
  - 'Title': index.md
  - 'Lorem': second.md

theme:
  name: material
  features:
    - navigation.tabs
    - navigation.tabs.sticky
    - navigation.footer
    - toc.follow

index.md:

---
hide:
  navigation
---

# H1

## H2

### H3

Text.

**Text**

One | Two
---|---
One | Lorem ipsum

### H3

Text.

**Text**

One | Two
---|---
One | Lorem ipsum

... Add more headers with content

... Headings that will sometimes be hidden in the TOC
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

### H3 - 222

Text.

**Text**

One | Two
---|---
One | Lorem ipsum

### H3 - 111

Text.

**Text**

One | Two
---|---
One | Lorem ipsum

### H3 - 000

Text.

**Text**

One | Two
---|---
One | Lorem ipsum

Bug description

I use the touchpad to scroll down the page, and sometimes the table of contents does not scroll to the end if the last few chapters fit in the viewing area.

Related links

Reproduction

example.zip

Steps to reproduce

Scroll down.

Chrome.mp4
Firefox.mp4

Browser

Chrome, Firefox

Before submitting

@reregaga reregaga added the needs investigation Issue must be investigated by the maintainers label Jan 31, 2023
@squidfunk squidfunk added bug Issue reports a bug and removed needs investigation Issue must be investigated by the maintainers labels Jan 31, 2023
@squidfunk squidfunk changed the title Sometimes TOC doesn't autoscroll to the end, when toc.follow feature is active and last few chapters fit in the viewing area Sometimes toc.follow doesn't move last entries into view Jan 31, 2023
@squidfunk
Copy link
Owner

Thanks for reporting and providing the excellent reproduction! It made tracking down and fixing the issue a breeze. Fixed in c5459af. Next time I work on anchor following I'll do a little refactoring, but for the time being this should work now 😊

Ohne.Titel.mp4

@squidfunk squidfunk added the resolved Issue is resolved, yet unreleased if open label Feb 2, 2023
@squidfunk
Copy link
Owner

Released as part of 9.0.10.

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

No branches or pull requests

2 participants