material icon indicating copy to clipboard operation
material copied to clipboard

select: inside md-dialog allows page scroll when panel open

Open ZoeChan2013 opened this issue 9 years ago • 4 comments

Actual Behavior:

  • What is the issue? *

I has a <md-select> inside <md-dialog>. I need the disableParentScroll: false for the <md-dialog>. But when I open the <md-select> inside <md-dialog> and scroll the page, the dialog will scrolled to top but the select will fixed on the page.

screen shot 2016-09-29 at 10 16 49 am

  • What is the expected behavior?

The expected behavior should be when open the select dropdown the page cannot be scrolled any more even though it can be scrolled before. If I use <md-select> alone, not inside a <md-dialog>, it has the expected behavior.

CodePen (or steps to reproduce the issue): *

  • CodePen Demo which shows your issue: http://codepen.io/zoeychan2013/pen/BLdLgy
  • Details: Click OPEN DIALOG button and open the select dropdown inside the dialog. Then scroll the page.

Angular Versions: *

  • Angular Version: 1.4.3
  • Angular Material Version: 1.1.1

Additional Information:


Shortcut to create a new CodePen Demo. Note: * indicates required information. Without this information, your issue may be auto-closed.

Do not modify the titles or questions. Simply add your responses to the ends of the questions. Add more lines if needed.

ZoeChan2013 avatar Sep 29 '16 14:09 ZoeChan2013

Did you figure this one out @ZoeChan2013 ?

ackzell avatar Mar 29 '17 00:03 ackzell

@ackzell I use pure javascript to disable the page scrolling only when user clicks on md-select and open that dropdown. After user makes a selection, I will enable the page scrolling again.

ZoeChan2013 avatar Mar 29 '17 00:03 ZoeChan2013

Thanks for the response @ZoeChan2013 !

I had a very similar issue, but on code that was implemented on Twitter's Bootstrap at the begining and the normalize.css file was removing a needed margin-bottom on the body tag we had for the styles. :)

ackzell avatar Mar 30 '17 05:03 ackzell

CodePen repro for 1.1.7. This is still an issue.

Splaktar avatar Feb 18 '18 06:02 Splaktar