File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,9 @@ export class NativeDialogRenderer implements Renderer {
63
63
}
64
64
65
65
private attach ( dialogController : DialogController ) : void {
66
- this . lastActiveElement = DOM . activeElement as HTMLElement ;
66
+ if ( dialogController . settings . restoreFocus ) {
67
+ this . lastActiveElement = DOM . activeElement as HTMLElement ;
68
+ }
67
69
68
70
const spacingWrapper = DOM . createElement ( 'div' ) ; // TODO: check if redundant
69
71
spacingWrapper . appendChild ( this . anchor ) ;
Original file line number Diff line number Diff line change @@ -121,7 +121,9 @@ export class DialogRenderer implements Renderer {
121
121
}
122
122
123
123
private attach ( dialogController : DialogController ) : void {
124
- this . lastActiveElement = DOM . activeElement as HTMLElement ;
124
+ if ( dialogController . settings . restoreFocus ) {
125
+ this . lastActiveElement = DOM . activeElement as HTMLElement ;
126
+ }
125
127
126
128
const spacingWrapper = DOM . createElement ( 'div' ) ; // TODO: check if redundant
127
129
spacingWrapper . appendChild ( this . anchor ) ;
You can’t perform that action at this time.
0 commit comments