Scroll position off autocomplete is not good if the parent scrolling element is not body.
Not scroll the page or scroll at the good position.
The autocomplete list is static.
Plunker template: https://plnkr.co/edit/54OGBu?p=preview
Test with Angular 4.1.2 & Material 2.0.0-beta.5
https://github.com/angular/material2/issues/3413 same problem I think
I'm having the same problem...
Plunker template: https://plnkr.co/edit/g9wLPm6Umafsp069upM3?p=preview
Which versions of Angular, Material?
Test with Angular 4.3.3 & Material 2.0.0-beta.6
Here is a current reproduction
That's because the autocomplete can't know which parent is scrollable. We could figure it out automatically, but it'll be very slow and unreliable. The way to let Material know that the autocomplete should reposition on scroll is to add the cdkScrollable directive on the scrollable parent. E.g.
<div style="height: 400px; overflow: auto" cdkScrollable></div>
This not works for me.
Works it if the overflow: auto is in a parent component/module ?
That's because the autocomplete can't know which parent is scrollable. We could figure it out automatically, but it'll be very slow and unreliable. The way to let Material know that the autocomplete should reposition on scroll is to add the
cdkScrollabledirective on the scrollable parent. E.g.<div style="height: 400px; overflow: auto" cdkScrollable></div>
thank you so much
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
That's because the autocomplete can't know which parent is scrollable. We could figure it out automatically, but it'll be very slow and unreliable. The way to let Material know that the autocomplete should reposition on scroll is to add the
cdkScrollabledirective on the scrollable parent. E.g.