material icon indicating copy to clipboard operation
material copied to clipboard

mdAutocomplete, mdSelect, mdMenu: cause extra scrollbar on body element

Open michaelbromley opened this issue 11 years ago • 7 comments

When the md-autocomplete suggestions list and the md-select options are displayed, an extra scrollbar appear on the <body> element. Example:

second-scroll-bar

I believe this is being caused by each of these components making a call to $mdUtil.disableScrollAround(), which in turn is setting overflow-y: scroll on the <body> element.

Not got time to test & do a PR right now, but perhaps this could be fixed by using overflow-y: auto instead?

michaelbromley avatar Jun 24 '15 08:06 michaelbromley

The same issue occurs with md-select it seems.

How would you go about implementing this workaround you mentioned?

evoker avatar Jun 25 '15 07:06 evoker

@evoker I created a pull request, it is super simple - you can see what it involves here: https://github.com/angular/material/pull/3457

michaelbromley avatar Jun 25 '15 15:06 michaelbromley

same happens with md-menu

marino-oneshoe avatar Jun 26 '15 08:06 marino-oneshoe

There is a update in HEAD and seems to work now: checked: mdAutocomplete mdMenu mdSelect

https://material.angularjs.org/HEAD/#/demo/material.components.menu

marino-oneshoe avatar Jun 29 '15 09:06 marino-oneshoe

Unfortunately, in IE11, the issue with the double scrollbars for md-select hasn't been resolved.

evoker avatar Jun 29 '15 11:06 evoker

This is fixed in HEAD.

naomiblack avatar Sep 04 '15 22:09 naomiblack

add below css: html { overflow: initial !important; }

dhaval-sukharamwala avatar Dec 19 '17 12:12 dhaval-sukharamwala