angular / angular/components

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

Đang mở
#33,080 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
area: material/sidenav gemini-triaged P3
Ngôn ngữ chính
TypeScript
Star
25k
Fork
6.8k
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
91

Mô tả

### 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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu với triển khai Angular Material Sidenav và tái hiện hành vi từ các bước của issue trên material.angular.dev bằng cách sử dụng mode="side" và opened="true". Theo dõi điều xảy ra trong quá trình điều hướng giữa các trang sau lần tải ban đầu, sau đó xác minh rằng việc điều hướng không còn kích hoạt animation mở trong khi sidenav vẫn mở.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
angular, typescript
Lĩnh vực
frontend
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
55/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.