md-select and md-autocomplete lists make page content disappear
In version 0.11, clicking on an md-select option (in a directive) makes the page content disappear. This occurs with the html body style=" overflow-y: auto; height: 100%;" and content overflowing the browser height.
Scrolling the body (with JQuery ScrollTo) after selecting an md-autocomplete item also makes the content disappear after a second search and select.
+1 same here. happens only if the page is scrolled. only the part of the page that is not visible without scrolling is hidden.
+1 ; although my problem is not exactly the same, it seems linked. If there is a scroll on the page, clicking on a select will mess the page layout (in my case, it overrides the width set on the body, which in turn stretches everything).
My apologies if by mistake this is a different issue entirely.
Whenever possible, please provide a CodePen Demo. To expedite resolution, please always test with the latest versions:
- Angular Material HEAD
- Bower Install - https://github.com/angular/bower-material/blob/master/angular-material.js
- Bower Install - https://github.com/angular/bower-material/blob/master/angular-material.css
- RAWGIT - https://rawgit.com/angular/bower-material/master/angular-material.js
- RAWGIT - https://rawgit.com/angular/bower-material/master/angular-material.css
- AngularJS Current
- Angular 1.3.19 (or greater)
- Angular 1.4.6 (or greater).
Can you confirm the issue still exists with the above versions ? I will reopen if needed.
Thanks for replying @topherfangio . Using the latest versions of Angular+Angular Material does not change a thing. But, writing a pen was definitely worth it, since I found a workaround.
Here's the pen : http://codepen.io/anon/pen/NGgxbY
On my (sort of low) resolution, there is a scroll on the display panel. Clicking the select while there is a scroll on stretches the body. If you remove some of the paragraphs to remove the scroll, clicking the select works just fine.
An easy workaround is to wrap the content of the body in a div, and apply the .center-body class to that div instead of the body. Doing that, I don't seem to have any problem. Don't know if this will help the problem mentionned by the other two posters though.
EDIT : this also solved another problem (which was less important) : without the workaround mentionned, the modal mask which appears when using a dialog covered only the center part of the page, leaving the sides white. With the workaround, it works as intended. In the end, the problem is probably more lying in my lack of HTML/CSS knowledge and less in Angular Material. Sorry for that !
Find a solution:
Add to your css:
body { height: auto !important; }