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

Actions overflow in top app bar when dismissable drawer is open #4138

Closed
thdk opened this issue Dec 2, 2018 · 3 comments
Closed

Actions overflow in top app bar when dismissable drawer is open #4138

thdk opened this issue Dec 2, 2018 · 3 comments

Comments

@thdk
Copy link

thdk commented Dec 2, 2018

What MDC Web Version are you using?

latest (included in codepen) (0.41.0 ?)

What browser(s) is this bug affecting?

Chrome 70

What OS are you using?

Windows 10

What are the steps to reproduce the bug?

https://codepen.io/thdk/pen/BGbjoY

What is the expected behavior?

Action on the right side of the top app bar should remain visible when the dismissable drawer is open

What is the actual behavior?

The actions are pushed to the right outside the viewport when the dismissable drawer is open

Any other information you believe would be useful?

Many related issues which are all closed /merged #2750 #3417 #3563

Closed drawer, icons are visible
image

Open drawer, icons of actions in top app bar are gone
image

@abhiomkar
Copy link
Contributor

hi there, You'll need to set top app bar's position to absolute so that it'll be absolutely positioned relative to mdc-drawer-app-content element.

Here is the fix on codepen.

@thdk
Copy link
Author

thdk commented Dec 4, 2018

@abhiomkar thanks! I'll test it out immediately.

Do you know if this is documented somewhere?

@thdk
Copy link
Author

thdk commented Dec 4, 2018

Just found it: Usage with Top App Bar

https://material.io/develop/web/components/drawers/

In cases where the drawer occupies the full viewport height, some styles must be applied to get the dismissible drawer and the content below the top app bar to independently scroll and work in all browsers.

body {
  display: flex;
  height: 100vh;
}

.mdc-drawer-app-content {
  flex: auto;
  overflow: auto;
}

.main-content {
  overflow: auto;
  height: 100%;
}

.app-bar {
  position: absolute;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants