Description
Bug, feature request, or proposal:
Bug?
What is the expected behavior?
The overlay panel of autocomplete should reposition on mat-sidenav-container scolling underneath
What is the current behavior?
The panel stays put on it original position. Consider this code:
<form class="person-form"
#personEditForm="ngForm"
[formGroup]="form"
(ngSubmit)="save(form.value)"
(keyup)="onKey($event)"
novalidate>
<fieldset fxFlex="100">
<legend i18n>Status & Tags</legend>
<mh-tags [source]="tagSource"
formControlName="status"
placeholder="Status"></mh-tags>
</fieldset>
...
The component (mh-tags) HTML looks like this:
<mat-form-field floatPlaceholder="always">
<mat-chip-list #chipList>
<mat-icon matPrefix>label_outline</mat-icon>
<mat-chip *ngFor="let tag of _value" (remove)="remove(tag)">
{{tag.text}} <mat-icon matChipRemove>cancel</mat-icon>
</mat-chip>
<input [matChipInputFor]="chipList"
[matChipInputAddOnBlur]="false"
(matChipInputTokenEnd)="addNew($event)"
[matAutocomplete]="auto"
placeholder="{{placeholder}}"
#chipInput>
</mat-chip-list>
<mat-autocomplete #auto="matAutocomplete" [displayWith]="displayFn" (optionSelected)="add($event)">
<mat-option *ngFor="let tag of sourceFiltered()" [value]="tag">
<span>{{ tag.text }}</span>
</mat-option>
</mat-autocomplete>
</mat-form-field>
Here is the layout for it.
What are the steps to reproduce?
Could not reproduce on stackblitz because mat-sidenav-container seems not to be part of beta.12.
I am using the nightly builds.
What is the use-case or motivation for changing an existing behavior?
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular: 4.4.4
Typescript: 2.5.3
Material/cdk: nightlies
cli: 1.5.0-rc.1
Is there anything else we should know?
I know there has been a few issues (#4557, #5797, #4093) on this already, plus a couple of PRs (#4293, #4500, #4855, #5134) that must have fixed this.
However, in my case it sill remains. May it is because of the way the sticky sidenav works now?
I have tried to apply the cdkScrollable
directive to almost every parent element of the autocomplete. No cigar.