bug(sidenav): Sidenav opening animation triggers on page navigation
- 主要语言
- 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
When using Angular Material’s Sidenav with `mode="side"` and `opened="true"`, navigating between pages triggers the opening animation, even though the sidenav is already in the open state. This behavior is inconsistent with the initial navigation, where the animation does not occur (which is the expected behavior).
### Reproduction
Steps to reproduce:
1. Go to https://material.angular.dev/components/sidenav/overview
2. Click on any link and go back to the previous page
### Expected Behavior
If the sidenav’s opened input is set to true initially, the opening animation should not play when moving between pages.
### Actual Behavior
The opening animation is triggered on page navigation, even if the sidenav is already open.
### Environment
- Angular: 21.2.6
- CDK/Material: 21.2.6
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): Windows
贡献指南
调研方向
从 Angular Material Sidenav 实现开始,使用 mode="side" 和 opened="true",复现 issue 在 material.angular.dev 步骤中描述的行为。跟踪初始加载后页面导航期间发生的情况,然后验证在 sidenav 保持打开的同时,导航不再触发打开动画。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, typescript
- 领域
- frontend
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 55/100