search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Warnings in Chrome console for the scheduler

Asked by Benoit
1 month ago.

Hello,

I am currently developing an internal project with the daypilot scheduler. We have a licence.

My project is in Angular 12 and I have plenty of warnings into Chrome console generated by the scheduler. I already searched on the forum for possible solutions but I cannot manage to get rid of them. My purpose here is to remove every warning like this from the console.

The warning is the below :

“[Violation] Added non-passive event listener to a scroll-blocking <some> event. Consider marking event handler as 'passive' to make the page more responsive. See <URL>”

In attachment a sample project in a zip folder. I based my sample on the Angular 12 Quick start Project. I just add 3 primeng components above the scheduler to mimic what we have into the “real” project. First there is a calendar input and also 2 arrow buttons. The arrows are used to navigate through months.
To reproduce the problem:

  • Inside the project: npm install to install all the dependencies of the project.
  • Then: ng serve to start the project
  • Open Chrome, go on localhost:4200, then the console, then click on one arrow button: the warning should appear in the console
  • If you continue clicking on the button, the warnings number in the console increase

Could you please help ?

Do not hesitate if you have questions. As explained I already use your forum to try to resolve the issue (example : https://forums.daypilot.org/question/4159/non-passive-event-listener).

Many thanks.

Regards,

Answer posted by Dan Letecky [DayPilot]
1 month ago.

The warnings on non-passive event listener only appear if you set the log level to "Verbose". It's a hint and not something that can be "fixed" in all cases.

The non-passive listener is essential for the Scheduler and there is no other way to implement the required features (it's required for touch gestures).

You'll be able to get rid of log messages with "Info", "Warnings", and "Errors" levels. You may not be able to remove all "Verbose" messages.

Comment posted by Dan Letecky [DayPilot]
1 month ago.

In the latest sandbox build (2021.3.5071) the number of these messages is now reduced on devices without touch support. You may still see one message about "wheel" event.

New Reply
This reply is
Your name (optional):