Skip to content

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

@Mikastark

Description

@Mikastark

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions