PolymerElements / paper-button

A button à la Material Design
https://www.webcomponents.org/element/PolymerElements/paper-button
138 stars 64 forks source link

paper-button throws violation warning message #170

Open yveslange opened 6 years ago

yveslange commented 6 years ago

Description

The paper-button element throws a warning in the console:

gestures.html:435 [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

Expected outcome

It should not throw this warning

Live Demo

https://www.webcomponents.org/element/PolymerElements/paper-icon-button

Steps to reproduce

Import and use the paper-button or paper-icon-button

Browsers Affected

keanulee commented 6 years ago

Consider using Polymer.setPassiveTouchGestures(true) to fix this. We can't do this at the element level though, since some apps may use gestureEvent.preventDefault() to prevent scrolling. For more details, see https://github.com/Polymer/polymer/releases/tag/v2.1.0