Skip to content

bug(mat-calendar): Console warning from mat-calendar component #27072

Closed
@ElecTreeFrying

Description

@ElecTreeFrying

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

I noticed that the mat-calendar component is showing a console warning. Here's the warning message:

[Violation] Added non-passive event listener to a scroll-blocking 'touchmove' event.
Consider marking event handler as 'passive' to make the page more responsive.
See https://www.chromestatus.com/feature/5745543795965952

The component is defined in the MatCalendarTestComponent Angular component. Here's the code:

@Component({
  selector: 'app-mat-calendar-test',
  template: '<mat-calendar />',
  standalone: true,
  imports: [
    MatNativeDateModule,
    MatDatepickerModule,
  ]
})
export class MatCalendarTestComponent {}

Reproduction

Steps to reproduce:

  1. create a standalone component
  2. import MatNativeDateModule and MatDatepickerModule
  3. declare mat-calendar

Expected Behavior

This console warning should not show.

[Violation] Added non-passive event listener to a scroll-blocking 'touchmove' event.
Consider marking event handler as 'passive' to make the page more responsive.
See https://www.chromestatus.com/feature/5745543795965952

Actual Behavior

Declaration of mat-calendar shows this console warning.

[Violation] Added non-passive event listener to a scroll-blocking 'touchmove' event.
Consider marking event handler as 'passive' to make the page more responsive.
See https://www.chromestatus.com/feature/5745543795965952

Environment

  • Angular: 16.0.0
  • CDK/Material: 16.0.0
  • Browser(s): Google Chrome 112
  • Operating System (e.g. Windows, macOS, Ubuntu): WIndows 10

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions