material icon indicating copy to clipboard operation
material copied to clipboard

autocomplete: md-dialog content is scrollable when autocomplete is open

Open mohanmanis opened this issue 7 years ago • 2 comments

Bug

It is a. bug

What is the expected behavior?

parent dialog should not get scrolled while child (md-autocomplete) is still open.

What is the current behavior?

parent dialog is getting scrolled while the child (md-autocomplete) is still open.

CodePen and steps to reproduce the issue:

[CodePen Demo]https://codepen.io/mohanmanis/pen/bLMjaK?editors=1010
Detailed Reproduction Steps:

1.create a md-dialog and have a md-autocomplete on this. 2.open the md-autocomplete and try to scroll through the dialog. 3.It will be seen that md-autocomplete is static and open but we are able to scroll through the dialog.

4.see this giphy media.giphy.com/media/g4IN2m1Lju5wiZGc5P/giphy.gif

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

apart from this other component support preventParentScroll.

Which versions of AngularJS, Material, OS, and browsers are affected?

angularJs-1.6.8 material-1.1.6 reproducible in chrome,mozila,IE11 and edge OS-windows10,ubuntu

Is there anything else we should know? Stack Traces, Screenshots, etc.

mohanmanis avatar Feb 22 '18 09:02 mohanmanis

This seems to be a related to https://github.com/angular/material/issues/9724. That issue is about select, but the behavior seems to be the same.

I had some issues with your demo, so I made some tweaks to it to make it easier for me to see this behavior. Updated CodePen.

Splaktar avatar Feb 26 '18 01:02 Splaktar

The same happens when the autocomplete is on a sidenav and the user scrolls the sidenav: https://codepen.io/rreitmann/pen/gzQJxL

IMHO autocomplete should look for a parent md-content and disable scrolling for the time the virtual-repeat-container is open.

rreitmann avatar May 18 '18 09:05 rreitmann