angular / angular/components

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

Aperta
#33,080 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
area: material/sidenav gemini-triaged P3
Lingua principale
TypeScript
Stelle
25k
Fork
6.8k
Merge medio
1g 8h
PR unite (30g)
91

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia con l’implementazione di Angular Material Sidenav e riproduci il comportamento descritto nei passaggi dell’issue su material.angular.dev usando mode="side" e opened="true". Traccia cosa accade durante la navigazione tra le pagine dopo il caricamento iniziale, quindi verifica che la navigazione non attivi più l’animazione di apertura mentre il sidenav rimane aperto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
angular, typescript
Ambito
frontend
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
55/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.