Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/material/sidenav/drawer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,7 @@ export class MatDrawer implements AfterViewInit, AfterContentChecked, OnDestroy
readonly _modeChanged = new Subject<void>();

private _injector = inject(Injector);
private _changeDetectorRef = inject(ChangeDetectorRef);

constructor(
private _elementRef: ElementRef<HTMLElement>,
Expand Down Expand Up @@ -593,6 +594,8 @@ export class MatDrawer implements AfterViewInit, AfterContentChecked, OnDestroy
}
}

// Needed to ensure that the closing sequence fires off correctly.
this._changeDetectorRef.markForCheck();
this._updateFocusTrapState();

return new Promise<MatDrawerToggleResult>(resolve => {
Expand Down