Skip to content

Commit a7074af

Browse files
vivian-hu-zzjosephperrott
authored andcommitted
Revert "fix(autocomplete): auto-highlighted first option not display correctly if the floating label is disabled" (angular#14505)
* Revert "Revert "fix(snack-bar): announcing same message twice to screen readers" (angular#14494)" This reverts commit e9466a4. * Revert "Revert "fix(dialog,bottom-sheet): invert backdrop color on dark themes" (angular#14492)" This reverts commit 3eb7e9c. * Revert "Revert "fix(menu): allow text wrapping in menu items" (angular#14493)" This reverts commit a3da8d2. * Revert "build: update nodejs bazel rules (angular#14466)" This reverts commit a3fef46. * Revert "docs(form-field): native select reset values not working in examples (angular#14236)" This reverts commit 97f52c0. * Revert "fix(menu): allow text wrapping in menu items (angular#11430)" This reverts commit 3661abe. * Revert "fix(dialog,bottom-sheet): invert backdrop color on dark themes (angular#13065)" This reverts commit fe96f38. * Revert "build: replace deprecated tslint rule with compiler option (angular#13186)" This reverts commit 5dfa45f. * Revert "fix(snack-bar): announcing same message twice to screen readers (angular#13298)" This reverts commit 3fb4b23. * Revert "feat(drag-drop): allow entire group of drop lists to be disabled (angular#14179)" This reverts commit 94e76de. * Revert "fix(drag-drop): prevent text selection while dragging on Safari (angular#14405)" This reverts commit 220e388. * Revert "fix(autocomplete): auto-highlighted first option not display correctly if the floating label is disabled (angular#14414)" This reverts commit 53d2b58.
1 parent ec2d2de commit a7074af

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

src/lib/autocomplete/autocomplete-trigger.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,6 @@ export class MatAutocompleteTrigger implements ControlValueAccessor, OnDestroy {
493493
switchMap(() => {
494494
this._resetActiveItem();
495495
this.autocomplete._setVisibility();
496-
this._changeDetectorRef.detectChanges();
497496

498497
if (this.panelOpen) {
499498
this._overlayRef!.updatePosition();

src/lib/autocomplete/autocomplete.spec.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1644,22 +1644,6 @@ describe('MatAutocomplete', () => {
16441644
.toContain('mat-active', 'Expected first option to be highlighted.');
16451645
}));
16461646

1647-
it('should be able to preselect the first option when the floating label is disabled',
1648-
fakeAsync(() => {
1649-
fixture.componentInstance.floatLabel = 'never';
1650-
fixture.componentInstance.trigger.autocomplete.autoActiveFirstOption = true;
1651-
fixture.detectChanges();
1652-
1653-
fixture.componentInstance.trigger.openPanel();
1654-
fixture.detectChanges();
1655-
zone.simulateZoneExit();
1656-
// Note: should not have a detectChanges call here
1657-
// in order for the test to fail when it's supposed to.
1658-
1659-
expect(overlayContainerElement.querySelectorAll('mat-option')[0].classList)
1660-
.toContain('mat-active', 'Expected first option to be highlighted.');
1661-
}));
1662-
16631647
it('should be able to configure preselecting the first option globally', fakeAsync(() => {
16641648
overlayContainer.ngOnDestroy();
16651649
fixture.destroy();

0 commit comments

Comments
 (0)