Click here to Skip to main content
15,942,159 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a number of event listeners on my page, below are an example of 2. When in debug mode in chrome I get:
[Violation] Added non-passive event listener to a scroll-blocking 'mousewheel' event. Consider marking event handler as 'passive' to make the page more responsive
on page load and every time I click on a select box.

$(function() {
    $( "#mSM_colFrom" ).spinner({
       step: 1, min: 0, max: obj.cols -1
    });
});

$('#mSM_AvailableBins').on('change', function() {
		 
		$('#mSM_AvailableCategories').prop('selectedIndex', -1);
		table.find(".state-edit-mark").removeClass("state-edit-mark");
 });


What I have tried:

I have read several articles but could not fine a way to eliminate the violations that continuously are being shown.

I have tried to put a ,false at every function

$('#mSM_AvailableBins').on('change', function() {
		 
		$('#mSM_AvailableCategories').prop('selectedIndex', -1);
		table.find(".state-edit-mark").removeClass("state-edit-mark");
 },false);


I also tried to change the way I am declaring my onChange event listener but no luck. Can anyone help me out please? or give me a hint please?
Posted
Updated 3-Jan-18 0:28am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900