I am using hammer for dragging and it is getting choppy when loading other stuff, as this warning message is telling me.

Handling of ‘touchstart’ input event was delayed for X ms due to
main thread being busy. Consider marking event handler as ‘passive’ to
make the page more responsive.

So I tried to add ‘passive’ to the listener like so

Hammer(element[0]).on("touchstart", function(ev) {
  // stuff
}, {
  passive: true
});

but I’m still getting this warning.

8 Answers
8

Leave a Reply

Your email address will not be published. Required fields are marked *