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

HTML Sidebar contents display over top of requirements text when long headings are used #327

Closed
wrc-jasonw opened this issue Apr 15, 2019 · 3 comments · Fixed by #622
Closed

Comments

@wrc-jasonw
Copy link

wrc-jasonw commented Apr 15, 2019

It appears the sidebar menu that is present in HTML export can display over top of content. In my document the first heading is long. When the page is scrolled all the way up the sidebar wraps text as expected. However when the page is scrolled down the sidebar text extends overtop the page requirements and headings.

Screenshots are shown below.

Screenshot: Text over-top heading when scrolled down:
image
Screenshot: Text over-top requirement when scrolled down further:
image

Screenshot text wrapped when scrolled all the way to top:
image

I propose that the sidebar behavior be modified to accommodate documents with long headings. (to prevent the sidebar text from appearing over-top the requirements/headings)

Browser: Firefox 66
OS: XUbuntu 18.04
Commit: 3c9c4d5 ("Update dependencies")

@wrc-jasonw
Copy link
Author

wrc-jasonw commented Apr 16, 2019

I have done some more investigation.

It turns out the NAV bar gets assigned the "position: fixed;" CSS property. When this happens the element no longer inherits the width from its parent element. Instead it is free to expand as wide as it wants. I did a google search and found a stack overflow post with a generic solution: https://stackoverflow.com/questions/16018520/is-it-possible-to-keep-the-width-of-the-parent-element-when-position-fixed-is-a

In short: the recommended solution is the use JQuery to dynamically set the width of the <nav id="TOC" ... > element to the width of its parent. I think should happen when the document is initially loaded and each time the document resizes. Setting the width should cause the text to wrap as expected.

I have a screenshot below showing the element and associated HTML/CSS in Firefox developer mode.
image

@rickeywang
Copy link
Collaborator

I have fixed this in my own build of doorstop long time ago but forgot to merge it upstream. It's now in #353.

@neerdoc
Copy link
Collaborator

neerdoc commented Mar 9, 2022

This is still an issue. Is it possible to fix by adding word-break to the headers?

@neerdoc neerdoc added this to the v2.4 milestone Mar 9, 2022
villanella pushed a commit to villanella/doorstop that referenced this issue Oct 25, 2023
neerdoc added a commit to neerdoc/doorstop that referenced this issue Jan 19, 2024
lbiaggi pushed a commit to lbiaggi/doorstop that referenced this issue Mar 13, 2024
lbiaggi pushed a commit to lbiaggi/doorstop that referenced this issue Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants