Click here to Skip to main content
13,631,113 members
Rate this:
 
Please Sign up or sign in to vote.
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 29-Dec-17 1:34am
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Cookies | Terms of Service
Web01-2016 | 2.8.180712.1 | Last Updated 3 Jan 2018
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100