Skip to content

Disabling overscroll with tocify #93

@SamuelRazzell

Description

@SamuelRazzell

First of all, tocify is really gorgeous and simple. Thank you for making it, it's really helpful.

I've been trying to add tocify to my site for the past week, and I could never get the highlighting as you scroll functionality to work. I finally found that the root cause was that I disabled overscrolling on my site, and tocify seems to scroll on the html or body elements, and this was incompatible with the way I disabled overscroll. Here's the css I used:

html {
    overflow: hidden;
    height: 100%;
}

body {
    height: 100%;
    overflow: auto;
}

Is there a way to change the element that tocify scrolls, or another workaround so that I can have tocify working without overscroll? Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions