Giter Club home page Giter Club logo

Comments (5)

tscanlin avatar tscanlin commented on September 24, 2024 1

Hey, glad you like tocbot, thanks for the praise!

And thanks for your thorough example / explanation of the problem. Lol, this is very weird and at first I saw this and thought oh well you can't do overflow-y hidden on the root elements. But then I noticed you had overflow-x: hidden which seems like it should be fine because it keeps the main root element scrollable (y-axis) which is needed for the native browser handling of hash urls to work (which tocbot works with / uses too). Anyway, suffice to say I think if you can just change html, body { overflow-x:hidden } to body { overflow-x:hidden } that should work. Let me know if it does / doesn't work for you. This is a very weird issue and also weird that it happens in firefox too. Anyway, hope that fix works!

from tocbot.

kareem avatar kareem commented on September 24, 2024 1

from tocbot.

kareem avatar kareem commented on September 24, 2024 1

change html, body { overflow-x:hidden } to body { overflow-x:hidden } that should work

This did indeed work! Thanks! I'm not sure I fully understand why it does, though. Are you able to share why that works?

Thank you so much @tscanlin!

from tocbot.

tscanlin avatar tscanlin commented on September 24, 2024

Hey, did this help resolve the issue?

from tocbot.

tscanlin avatar tscanlin commented on September 24, 2024

Glad that worked!

I'm not really sure why exactly it works, but seems to be a weird browser issue, see here for more workarounds:
https://stackoverflow.com/questions/47095596/body-overflow-x-hidden-breaks-position-sticky

also this has more info:
https://stackoverflow.com/a/44929597/1655810

from tocbot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.