matter-js icon indicating copy to clipboard operation
matter-js copied to clipboard

Passive Event Listeners

Open AliaNeedsHelp opened this issue 3 years ago • 3 comments

Apparently, my game is throwing errors saying [Violation] Added non-passive event listener to a scroll-blocking 'mousewheel' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952 I did some research and turns out this can be fix this by adding the passive flag to document.addEventListener for some browsers.

AliaNeedsHelp avatar Feb 19 '21 14:02 AliaNeedsHelp

do you have a sample code?

take care

francoispeyret avatar Feb 26 '21 19:02 francoispeyret

@AliaNeedsHelp I can't reproduce this on any of the examples, can you share the code that shows the issue?

liabru avatar Feb 27 '21 16:02 liabru

ya @AliaNeedsHelp you need to show your code

ErrorBot1122 avatar Mar 02 '21 21:03 ErrorBot1122