Skip to content

bug(Sidenav): Setting height: 100vh to mat-sidenav-container, scroll event not working! #26555

@Ruslancic

Description

@Ruslancic

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 setting 100vh to mat-sidenav-container, scroll event stop working! On mobile, there is impossibile to scroll down the page!

Reproduction

Steps to reproduce:

  1. ng new app
  2. ng add @angular/material
  3. add example from oficial page
  4. set style="height:100vh" to mat-sidenav-container
  5. Add simple @HostListener('window:scroll', []) event or fromEvent(document, 'scroll'). All this event not emit nothing, if i have height to 100vh!

Expected Behavior

All event must emit events

Actual Behavior

Scroll event not working

Environment

  • Angular:
  • CDK/Material: 15.1.1
  • Browser(s): Chrome, Mozilla, Edge
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows 11

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/sidenav

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions