Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 task done
ElecTreeFrying opened this issue May 10, 2023 · 1 comment · Fixed by #27082
Closed
1 task done

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

ElecTreeFrying opened this issue May 10, 2023 · 1 comment · Fixed by #27082
Assignees
Labels
area: material/datepicker P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@ElecTreeFrying
Copy link

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
@ElecTreeFrying ElecTreeFrying added the needs triage This issue needs to be triaged by the team label May 10, 2023
@crisbeto crisbeto self-assigned this May 11, 2023
@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent area: material/datepicker and removed needs triage This issue needs to be triaged by the team labels May 11, 2023
crisbeto added a commit to crisbeto/material2 that referenced this issue May 11, 2023
Fixes that the date range picker might log a warning, because we aren't setting some events as explicitly active.

Fixes angular#27072.
angular-robot bot pushed a commit that referenced this issue May 19, 2023
Fixes that the date range picker might log a warning, because we aren't setting some events as explicitly active.

Fixes #27072.
angular-robot bot pushed a commit that referenced this issue May 19, 2023
Fixes that the date range picker might log a warning, because we aren't setting some events as explicitly active.

Fixes #27072.

(cherry picked from commit fc919ce)
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jun 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: material/datepicker P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants