Skip to content

Commit 54e1118

Browse files
committed
fix(material/drawer): redo logic
changed logic to where anytime the drawer is closed or when in mode side the tabindex is cleared fixes b/286459024
1 parent a1c6329 commit 54e1118

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/material/sidenav/drawer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ export class MatDrawerContent extends CdkScrollable implements AfterContentInit
157157
'class': 'mat-drawer',
158158
// must prevent the browser from aligning text based on value
159159
'[attr.align]': 'null',
160+
'[attr.tabindex]': '(!opened || mode === "side") ? null : -1',
160161
'[class.mat-drawer-end]': 'position === "end"',
161162
'[class.mat-drawer-over]': 'mode === "over"',
162163
'[class.mat-drawer-push]': 'mode === "push"',
@@ -165,7 +166,6 @@ export class MatDrawerContent extends CdkScrollable implements AfterContentInit
165166
// this was also done by the animations module which some internal tests seem to depend on.
166167
// Simulate it by toggling the `hidden` attribute instead.
167168
'[style.visibility]': '(!_container && !opened) ? "hidden" : null',
168-
'[attr.tabindex]': 'mode === "side" ? null : "-1"',
169169
},
170170
changeDetection: ChangeDetectionStrategy.OnPush,
171171
encapsulation: ViewEncapsulation.None,

0 commit comments

Comments
 (0)