-
Notifications
You must be signed in to change notification settings - Fork 5
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
Disable scrolling and interation with main page when ToC is open on mobile #155
Comments
Also, clicking outside of the ToC should close it, rather than just the X doing that. |
Here we're going to need javascript. Add a For preventing scrolling, the best way is to add The last thing we should do is add the attribute |
Conditional attributes is one of the reasons people use react for web programming. But it comes with a ot of strings attached and definitely doesn't fit your use case. |
(this is when I drag the window to be super narrow, which I think most desktop users won't do, but it might in principle happen...) |
As far as the |
I went ahead and merged the work so far, but it would be nice to fix the reflow issue, so this can stay open. |
Thanks again @jakobvase, by the way! |
It would be great if opening the ToC menu on narrow screens would cause the rest of the page to get grayed out and disabled, to prevent accidental scrolling or clicks.
@jakobvase, what's the canonical way to do this?
The text was updated successfully, but these errors were encountered: