I have discovered an issue with overlay's I believe.
You can see exactly what I am referring to in the plunker I made which reproduces the issue.
It seems that the overlay's if in a container that is scrollable (which is the scenario I have) the reposition strategy seems to break. I also tried the block strategy but no luck with that either. I think the main issue is that overlay does not think it is scrolling in this scenario.
Scroll strategies should work no matter where they are not just in the main body.
See the plunkr below. The overlay will scroll with the screen and be completely detached from the input.
Have a div that is so heigh for example 250px and than have another div 1000px for example.
Make the first div have overflow: auto; it will than make it scrollable. In this scenario the overlay scrolling strategies stop working.
Providing a Plunker (or similar) is the best way to get the team to see your issue.
Plunker template: https://goo.gl/DlHd6U
http://plnkr.co/edit/Cm9ZDmHLpoSOiGZBvmny?p=preview
I should be able to make a separate container that is scrollable on a website and have the overlay strategies still work.
4.3.2 (Plunkr), Chrome
You need to add the attribute cdk-scrollable to the scrollable element.
Correct. There's no performant way to figure out what elements are scrollable, but you can set the cdk-scrollable attribute yourself.
Ah that makes sense! thanks a ton guys.
Works :)
This can be closed.
Sorry to necro, but could this be added to the documentation? I have been looking around, and eventually stumpled across this issue.
The same issue persists if the overlay has a backdrop.
The scroll on the page will be disabled if the main body of the page is not scrolling.
And setting cdkScrollable on the scrolling block doesn't solve the issue in this case. Do you have an alternative for this?
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
_This action has been performed automatically by a bot._
Most helpful comment
Sorry to necro, but could this be added to the documentation? I have been looking around, and eventually stumpled across this issue.