0

I have not been able to solve this problem for several days, no one could help me. I have a scrolling issue, I am using angular / material in my project and I have a mat-checkbox element. When the mat-checkbox checked element the page scrolling is blocked, I tried everything that could have not effect. No errors at the same time. I tried to monitor the scroll event with the following functions:

document.addEventListener('wheel', (evt) => {
      console.log('Scrolling-passive event');
    }, {
      capture: true,
      passive: true
    });

window.addEventListener('scroll', function() {
      console.log('Scrolling');
    }, true);

When scrolling works, both functions print in the console, but when scrolling breaks in the console, only the "Scroll-passive event" is printed. In the console, I looked at Event Listeners on this element and did not find any other events, I also looked at css styles and also none effect. And I also have Verbose turned on in the console, and I don’t have messages like this

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

Help please, I don’t know what to do anymore ...

Sanasar Yuzbashyan
  • 599
  • 1
  • 5
  • 17
  • Does this answer your question? [Angular 4 - Added non-passive event listener to a scroll-blocking 'mousewheel' event.](https://stackoverflow.com/questions/50983289/angular-4-added-non-passive-event-listener-to-a-scroll-blocking-mousewheel-e) – Pushprajsinh Chudasama Dec 06 '19 at 05:58
  • 1
    No, I don’t have such a warning – Sanasar Yuzbashyan Dec 06 '19 at 06:03
  • try creating a demo on stackblitz to reproduce the issue – Allabakash Dec 06 '19 at 07:06
  • I use my Angular 7 project in place with Laravel, and some part of the front is written in AngularJs, and I can’t create this minimum, I will have to transfer the weight of the project to stackblitz, and this will take a very long time – Sanasar Yuzbashyan Dec 06 '19 at 07:28

0 Answers0