Skip to content

Commit 4498af0

Browse files
fix(module:drawer): should clear previously focused element (#8893)
1 parent 5fae01a commit 4498af0

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

components/drawer/drawer.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ export class NzDrawerComponent<T extends {} = NzSafeAny, R = NzSafeAny, D extend
522522
// We need the extra check, because IE can set the `activeElement` to null in some cases.
523523
if (this.previouslyFocusedElement && typeof this.previouslyFocusedElement.focus === 'function') {
524524
this.previouslyFocusedElement.focus();
525+
this.previouslyFocusedElement = undefined;
525526
}
526527
if (this.focusTrap) {
527528
this.focusTrap.destroy();

0 commit comments

Comments
 (0)