Skip to content

md-menu is defaulted to max-height: calc(100vh + 48px); and goes off pageΒ #2725

Closed
@coreyhickson

Description

@coreyhickson

Bug, feature request, or proposal:

Bug

What is the expected behavior?

I expect that the menu would size to stay on the screen and scroll when it has a lot of items in it.

What is the current behavior?

Currently, it will just go off the bottom of the page and I won't be able to see a lot of items.

image
This is the bottom of my browser and there are more items below it.

What are the steps to reproduce?

Add a menu with a lot of buttons. Don't put the menu at the top of the page. Open the menu, it will go down below the bottom of the page.

http://plnkr.co/edit/FPHeqOjRHpJOBNGn5dvz?p=preview

What is the use-case or motivation for changing an existing behavior?

If I want a bunch of items in a list.

Which versions of Angular, Material, OS, browsers are affected?

Angular: 2.3.1
Material: 2.0.0-alpha.11-3
Mac
Chrome

And I assume it's on most others.

Is there anything else we should know?

It looks like this is happening in https://github.com/angular/material2/blob/master/src/lib/menu/menu.scss#L16. So having it be a full viewport means it's guaranteed to go below the page.

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgenthelp wantedThe team would appreciate a PR from the community to address this issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions