Skip to content

Commit

Permalink
fix(module:drawer): should clear previously focused element (#8893)
Browse files Browse the repository at this point in the history
  • Loading branch information
ParsaArvanehPA authored Nov 25, 2024
1 parent 5fae01a commit 4498af0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions components/drawer/drawer.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,7 @@ export class NzDrawerComponent<T extends {} = NzSafeAny, R = NzSafeAny, D extend
// We need the extra check, because IE can set the `activeElement` to null in some cases.
if (this.previouslyFocusedElement && typeof this.previouslyFocusedElement.focus === 'function') {
this.previouslyFocusedElement.focus();
this.previouslyFocusedElement = undefined;
}
if (this.focusTrap) {
this.focusTrap.destroy();
Expand Down

0 comments on commit 4498af0

Please sign in to comment.