Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Slider: [Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event #6746

Closed
facorread opened this issue Jan 8, 2021 · 0 comments · Fixed by #6747

Comments

@facorread
Copy link

Hello, and thank you for your work on Material Components for Web. I recently started experiencing these warnings in the Chrome console. There is a similar issue previously reported in #4460

[Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952

  registerInteractionHandler @ component.js:364
  eval @ foundation.js:323
  MDCRippleFoundation.registerRootHandlers_ @ foundation.js:322
  MDCRippleFoundation.init @ foundation.js:189
  MDCComponent @ component.js:48
  MDCRipple @ component.js:46
  _loop_1 @ component.js:374
  MDCSlider.createRipples @ component.js:382
  MDCSlider.initialize @ component.js:236
  MDCComponent @ component.js:44
  MDCSlider @ component.js:51
  JsSliderValue @ app.js:144
  eval @ app.js:449
  eval @ app.js:98

This line seems to be the cause of the warning.

input.addEventListener(evtType, handler);

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
1 participant