angular / angular/components

bug(sidenav): nested side nav, inner fixedinviewport not respected in webkit

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

描述

### Is this a regression?

- [ ] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

_No response_

### Description

**Situation:**
When you have nested sidenavs and the inner sidenav mode is over and fixedInViewport is true that is not being respected properly in webkit browsers.

**Workaround:**
As a workaround, we found that setting the z-index of the outer container and content to auto fixes the issue.

### Reproduction

StackBlitz link: [link](https://stackblitz.com/edit/components-issue-starter-k2dsck2f?file=src%2Fexample%2Fsidenav-backdrop-example.css)

Steps to reproduce:
1. open stackblitz in chrome to see expected behavior
2. toggle the inner drawer and see that the content is rendered **over** the toolbar(sibling content)
3. open stackblitz in safari or webkit
4. toggle the inner drawer and see that the content is rendered **under** the toolbar(sibling content)
5. uncomment the css to see the workaround

### Expected Behavior

It should work in webkit as it does in chrome. Fixedinviewport and over mode should not only render on top of parent content but also any content that is sibling of the parent.

### Actual Behavior

On webkit, the inner sidenav is rendered underneath any sibling content of the outer sidenav.

### Environment

- Angular:19.0.3
- CDK/Material:19.0.3
- Browser(s): Safari, Webkit
- Operating System (e.g. Windows, macOS, Ubuntu): MacOS

贡献指南

打开贡献指南

调研方向

从链接的 StackBlitz 复现和其中的 src/example/sidenav-backdrop-example.css 开始,将 Chrome 中嵌套的 sidenav 与 Safari/WebKit 进行比较,然后再与文档记录的 z-index workaround 进行比较。当带有 fixedInViewport 的内部 over-mode sidenav 在 WebKit 中能够渲染在同级 toolbar 内容之上,且不需要该 workaround 时,即可视为完成。

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

评估

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

把新 issue 发到你的邮箱

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