angular / angular/components

bug(mat-sidenav): focus trapping is too aggressive under certain conditions

未关闭
#21,955 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area: material/sidenav G P2 regression
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 8 小时
30 天内合并 PR
91

描述

#### Reproduction

This issue seems to manifest under the following conditions:
- Sidenav is open in `over` or `push` mode (does not happen in `side` mode).
- Backdrop is disabled (this is necessary to be able to click in the content area of a `over` or `push` sidenav.
- App is using the `ConfigurableFocusTrap` (does not happen with the deprecated `FocusTrap`).

Steps to reproduce:
https://stackblitz.com/edit/angular-avy29p?file=src%2Fmain.ts
1. click to focus the "Content" input

#### Expected Behavior

"Content" input remains focused.

#### Actual Behavior

"Drawer" input immediately steals focus.

贡献指南

打开贡献指南

调研方向

从 src/main.ts 中链接的 StackBlitz 复现开始,使用 over 或 push sidenav、已禁用的 backdrop 和 ConfigurableFocusTrap 验证行为。跟踪点击 Content input 时的焦点行为;完成标准是 Content input 保持焦点,而不是 Drawer input 获取焦点。

由索引模型根据 Issue 内容生成。

评估

技术栈
angular, typescript
领域
accessibility, frontend
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。