shutterstock / rickshaw

JavaScript toolkit for creating interactive real-time graphs

Home Page:https://shutterstock.github.io/rickshaw

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RangeSlider.Preview touchstart event not passive

ryangrossGitHub opened this issue · comments

Chrome Version 59.0.3071.115 (Official Build) (64-bit) complains about non-passive touchstart:

[Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive.

Proposed solution:

element.select("rect.left_handle").on("touchstart", onMousedownLeftHandle, { passive: true }); element.select("rect.right_handle").on("touchstart", onMousedownRightHandle, { passive: true }); element.select("rect.middle_handle").on("touchstart", onMousedownMiddleHandle, { passive: true });

Additional info: https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md