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

Responsive drawer example: AppBar hides content #21320

Closed
2 tasks done
Hocdoc opened this issue Jun 5, 2020 · 2 comments
Closed
2 tasks done

Responsive drawer example: AppBar hides content #21320

Hocdoc opened this issue Jun 5, 2020 · 2 comments
Labels
support: question Community support but can be turned into an improvement

Comments

@Hocdoc
Copy link
Contributor

Hocdoc commented Jun 5, 2020

In the documentation for the Responsive drawer the content hides behind the AppBar.

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

When there is enough content to scroll the page, the top content hides behind the app bar.
The <div className={classes.toolbar} /> in the source doesn't have an effect.

Expected Behavior 🤔

The content should stay below the AppBar.

I've tried the three suggestions from AppBar/Fixed placement(see also #16844) and many other things, but this doesn't work with the Responsive drawer example from the documentation.

Steps to Reproduce 🕹

I have copied the source of the MaterialUI to a new sandbox with just more content and an anchor link to a header.

When you click there on the "Inbox" item in the drawer, I expect to jump to the anchor link "A Header".
Instead the text "A Header" is hidden by the AppBar and you have to manually scroll up to see the header.

@Hocdoc Hocdoc added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jun 5, 2020
@oliviertassinari oliviertassinari added support: question Community support but can be turned into an improvement and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Jun 5, 2020
@oliviertassinari
Copy link
Member

@Hocdoc This is a standard problem with sticky headers and anchor links: https://stackoverflow.com/questions/4086107/fixed-page-header-overlaps-in-page-anchors.

@Hocdoc
Copy link
Contributor Author

Hocdoc commented Jun 7, 2020

Thank you very much, this is the solution. :-)

I was not aware of this problem, maybe it would be helpful for others if you could add this helpful link somewhere in the Material UI documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support: question Community support but can be turned into an improvement
Projects
None yet
Development

No branches or pull requests

2 participants