Reputation: 2014
I've noticed that a page on my web app does not scroll when Chrome is used on a touchscreen PC. To test-fix the problem, I goto chrome://flags
and disable "Touch Events API". Conversely, to make the problem appear on my development machine, I enable it (the default is auto).
When Touch Events API is enabled, Chrome's console outputs:
[Violation] Added non-passive event listener to a scroll-blocking
touchstart
event. Consider marking event handler as 'passive' to make the page more responsive.[Violation] Added non-passive event listener to a scroll-blocking
touchmove
event. Consider marking event handler as 'passive' to make the page more responsive.
This violation comes from my jquery.min.js
file. The version is 2.1.3.
Questions:
Upvotes: 8
Views: 1963
Reputation: 3924
Do you have a JSFiddle or code example we can test? I am wondering if there is something in your code having issues.
You may also want to look at the solution in this question as well if you have more issues. Might be a simple fix or a longer need to write your own PassiveEvent handler.
Warning: Added non-passive event listener to a scroll-blocking 'touchstart' event
Upvotes: 0