angular / angular/components

bug(sidenav): Sidenav opening animation triggers on page navigation

オープン
#33,080 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
area: material/sidenav gemini-triaged P3
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
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" を使用して、material.angular.dev にある issue の手順の動作を再現します。初回読み込み後のページ遷移中に何が起きるかを追跡し、その後、sidenav が開いたままの状態で、ページ遷移によって開くアニメーションが発生しなくなることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
静か
明瞭さ
おおむね明確
初心者へのやさしさ
55/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。